minor code fix in memory allocator