fixed a tiny bug in keyboard input