Fixed MiniHeap issue in the code.