heap correction