minor fixes in task scheduler