Added a hack to work inside a worker.