diff --git a/workflow/rna-seq.nf b/workflow/rna-seq.nf
index 0c7285be25374b26259594e141f45b2cbf405e54..34b5a6d3cd3ce02ca514b98400d5e89fb14f9b21 100644
--- a/workflow/rna-seq.nf
+++ b/workflow/rna-seq.nf
@@ -1026,7 +1026,7 @@ process aggrQC {
 
     # remove inner distance report if it is empty (SE repRID)
     echo -e "LOG: removing dummy inner distance file" >> ${repRID}.aggrQC.log
-    if [ wc -l ${innerDistance} | awk '{print\${1}}' -eq 0 ]
+    if [ "${endsM}" == "se" ]
     then
       rm -f ${innerDistance}
     fi
@@ -1035,4 +1035,4 @@ process aggrQC {
     echo -e "LOG: running multiqc" >> ${repRID}.aggrQC.log
     multiqc -c ${multiqcConfig} . -n ${repRID}.multiqc.html
     """
-}
+}
\ No newline at end of file