Fix backspace and delete bug