fix Heap bug when popping the last element off a heap
Heapsort