removing the locking in the task agent