Clean up some inconsistencies with worker states and running tasks