key event listener fix