fix animation bug