fix heapsort