Fix errors in worker