Fixing errors in worker