Fixed bug with arrow keys