Fixing incorrect MinHeap implementation