Bug fix for animation&&math.