Bug Fixing in Heap Sort