Fix for heap not being power of two