Fix bug with backspace at the end of the line.