fixed the keyboard listener