Use onHeap option consistently throughout