Fixed some bugs with backspace