Another fix with writing past the end of the screen.