For one thing you have to make sure that your cursor positions dont exceed the boundries of the screen