Fixed bug with keyboard commands