The moral of this story is that, when you pick an artificial number as an arbitrary limit, you should always pick a power of two. Or a power of two, minus one. When people hear that you can only have 65535 contacts, they'll probably assume there's a good reason.