Fix capacity issue of MaxHeap