Heapify works, but something else in the heapsort method doesn't