Heapsort now works.