Fix end of screen bug