Fixed bug with keyboard presses