Fix weird bug that would stop the cursor from moving