fix a bug in pop when there're 2 elements in heap