Fixed problems in the worker