Fixed bug in Worker.run