fix task crash