Fixed bug in keyboard controls