Fix "animationend" event never called.