Fix arrow keys behaviour.