Fix issue with scrolling during animation