fixed bug of backspace and cursor