Fix Scheduler task cancelation