Fixing bug in worker.