fix heap.