Fix animation problems on mobile