Fixed error in animation.

Closes #2625