Fixing task scheduler.