memory bug correction