Allocator bug fixes