Improved scroll animation handling.