fixes a small bug in the keyboard_listener