Fixed problem where running tasks weren't propertly accounted for