fixed flicker bug of animation