fixing heapPage error on isSlotUsed and getNumEmptySlots