Fixed scope issues when calling emit event in create_link_service.