Fixes bug in moving from one grade to another using keyboard.