memory bug correction 2