more bug fixes in the allocator.