fix bug in AnimatedObject