fixed keyboard control issue