bug-fixing of keyboard input