Fix for animation timing