fix bug where workers with same capacity would not be unique