Fixing a bug with scrolling and drawing.