diff --git a/src/RNAseq_XGR.nf b/src/RNAseq_XGR.nf
index f4e4b65f7718e09e20fb2ce4a52b5c38423f58c8..0d97c5391d15e5ff79407f802e4aa04f75f5a16a 100644
--- a/src/RNAseq_XGR.nf
+++ b/src/RNAseq_XGR.nf
@@ -165,7 +165,7 @@ workflow {
     Channel
       .fromPath( "${params.idx}/*" )
       .set { genome_indexed_input }
-    mapping_withindex(genome_indexed_input, fastp.out.fastq)
+    mapping_withindex(genome_indexed_input.collect(), fastp.out.fastq)
     stats_bam(mapping_withindex.out.bam)
     filter_bam_mapped(mapping_withindex.out.bam)
   }