Fix bug in the setter methods uses for the TaskManager.