RE: 4K and 32K limits and other magic numbers.
Don't assume that a "power of 2" limit is always due to a bug. I used to manage a product that displayed info in tables, and I specifically limited the max size to 1024 rows. I could have picked any number, but using a power of 2 meant that everyone assumed it was a technical limit and didn't bother asking me to increase it :-)
Bob