fixed a bug for looping animation in CCAnimationCache