Fixed bug in Heap