Fix a bug on animation delay.