fixed van Emde Boas and memory leak