fixed issues with taskCount reseting