fixed allocator bug