Fixed issues in AnimationFactory.