correction to creation of worker instance form mongodb data