Fixes on HeapSort