Fixed scroll doesn't stop at the right position

This fix make sure that the scroll will stop at the right position after the animation.