fixed bug with task assignment.