fixed bugs in worker