Fixed wrong arguments passed to maybe_detach

This is preventing to programmatically run a worker with arguments passed not from the cmd.