updated the queue worker to fix a bug