finally fixed SIGSEV caused in memory allocator