fix bug of heap sort

anything wrong please comment