line memory bug fix