bug in assigning worker