Scrolling works, and now stops at proper places rather than at
arbitrary places.