fixing the bug in the workers