Fix cursor location