Working on task bugs
Fixes issues with scheduled tasks not finishing correctly