Disabled cursor from going off the screen