fixed allocator race condition