Fix the heap bug.