fixed keystroke bug