Fixed heapsort.