correct heap corruption