bug fix for allocator