Out of screen bug fixed (i think)

As you wanted I created a pull request. Now you can see all changes.