diff --git a/workflow/rna-seq.nf b/workflow/rna-seq.nf
index 1f0a4b246e1e0c48698ec3a654e3f6ae86ab515b..85a504f3b5e2d83a752f12be45fddf36dc1b1983 100644
--- a/workflow/rna-seq.nf
+++ b/workflow/rna-seq.nf
@@ -1135,7 +1135,7 @@ process dataQC {
   output:
     path "${repRID}_tin.hist.tsv" into tinHist
     path "${repRID}_tin.med.csv" into  tinMedInfer_fl
-    path "${repRID}.insertSize.inner_distance_freq.txt" into innerDistance
+    path "${repRID}_insertSize.inner_distance_freq.txt" into innerDistance
 
   script:
     """
@@ -1531,7 +1531,7 @@ process uploadProcessedFile {
   exist=\$(curl -s https://${source}/ermrest/catalog/2/entity/RNASeq:Processed_File/Replicate=${repRID})
   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
       python3 deleteEntry.py -r \${rid} -t Processed_File -o ${source} -c \${cookie}