Backspace logic error fix