Add correction for problem of inertial scrolling, and tests