Add support for worker_index