fix the heap used