Fix scrolling when character nears edge of screen