Fix a bug on animation