fix task scheduler