fixed bug on arrow keys