minor fix in key event