Fix AnimationRendering algorithm