diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3d8471b0a0e64ff2cf9c391f6a7c0f260f92452c..386333bb7d10ba47724d0a1a9aa214b6beb35a4f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -331,14 +331,14 @@ uploadQC:
     cookie=$(cat credential.json | grep -A 1 '\"staging.gudmap.org\": {' | grep -o '\"cookie\": \".*\"') &&
     cookie=${cookie:11:-1} &&
     if [ "${exist}" != "[]" ]; then
-      rids=$(echo ${exist} | grep -o '\"RID\":\".\{7\}' | sed 's/^.\{7\}\/\/')
+      rids=$(echo ${exist} | grep -o '\"RID\":\".\{7\}' | sed 's/^.\{7\}\/\/') &&
       for rid in ${rids}; do
         singularity run 'docker://gudmaprbk/deriva1.3:1.0.0' python3 ./workflow/scripts/deleteEntry.py -r ${rid} -t mRNA_QC -o staging.gudmap.org -c ${cookie} &&
         echo old mRNA QC RID deleted - ${rid}
       done
       echo all old mRNA QC RIDs deleted
     fi
-    rid=$(singularity run 'docker://gudmaprbk/deriva1.3:1.0.0' python3 ./workflow/scripts/uploadQC.py -r 17-BTFJ -e 17-BTG4 -p "Single Read" -s forward -l 35 -w 5 -f 1 -n 'This is a test mRNA QC' -o staging.gudmap.org -c ${cookie} -u F) &&
+    rid=$(singularity run 'docker://gudmaprbk/deriva1.3:1.0.0' python3 ./workflow/scripts/uploadQC.py -r 17-BTFJ -e 17-BTG4 -p "Single Read" -s forward -l 35 -w 5 -f 1 -n "This is a test mRNA QC" -o staging.gudmap.org -c ${cookie} -u F) &&
     echo ${rid} test mRNA QC created
 
 uploadProcessedFile:
@@ -355,7 +355,7 @@ uploadProcessedFile:
   - mv 17-BTFJ_test.csv ./deriva/Seq/pipeline/17-BTFA/17-BTG4/17-BTFJ_test.csv
   - >
     exist=$(singularity run 'docker://gudmaprbk/deriva1.3:1.0.0' curl -s https://staging.gudmap.org/ermrest/catalog/2/entity/RNASeq:Processed_File/Replicate=17-BTFJ) &&
-    cookie=$(cat credential.json | grep -A 1 '"staging.gudmap.org\: {' | grep -o '"cookie": ".*"') &&
+    cookie=$(cat credential.json | grep -A 1 '\"staging.gudmap.org\": {' | grep -o '\"cookie\": \".*\"') &&
     cookie=${cookie:11:-1} &&
     if [ "${exist}" != "[]" ]; then
       rids=$(echo $exist | grep -o '\"RID\":\".\{7\}' | sed 's/^.\{7\}//')
diff --git a/workflow/rna-seq.nf b/workflow/rna-seq.nf
index bf91e374c206cad06914de1260aa4fed5323d20e..402673eb46fe461aafcda041d73e5e0231924700 100644
--- a/workflow/rna-seq.nf
+++ b/workflow/rna-seq.nf
@@ -1391,7 +1391,7 @@ process uploadExecutionRun {
   cookie=\$(cat credential.json | grep -A 1 '\\"${source}\\": {' | grep -o '\\"cookie\\": \\".*\\"')
   cookie=\${cookie:11:-1}
 
-  exist=\$(curl -s https://${source}/ermrest/catalog/2/entity/RNASeq:Execution_Run/Workflow=\${workflow}/Replicate=${repRID})
+  exist=\$(curl -s https://${source}/ermrest/catalog/2/entity/RNASeq:Execution_Run/Workflow=\${workflow}/Replicate=${repRID}/Input_Bag=${inputBagRID})
   echo \${exist} >> ${repRID}.uploadExecutionRun.log
   if [ "\${exist}" == "[]" ]
   then