fixed Heap overflow