diff --git a/src/nf_modules/alntools/main.nf b/src/nf_modules/alntools/main.nf
index ef1e879ee1dcd4d8212a1be546d5e1904750a696..148e976b8c8c07d41b081d7513eb1e51b916efbe 100644
--- a/src/nf_modules/alntools/main.nf
+++ b/src/nf_modules/alntools/main.nf
@@ -21,16 +21,16 @@ process bam2ec {
 
   script:
 """
-awk -F"[\t;]" '
+awk -F"[\\t;]" '
 \$3=="exon" {
         ID=gensub(/transcript_id \"(.*)\"/, "\\1", "g", \$11); 
         LEN[ID]+=\$5-\$4+1;
     } 
 END{
     for(i in LEN)
-        {print i"\t"LEN[i]}
+        {print i"\\t"LEN[i]}
     }
 ' ${gtf} > ${gtf.simpleName}_transcripts_lengths.tsv
-alntools bam2ec ${params.bam2sec} -t ${gtf.simpleName}_transcripts_lengths.tsv -c 8 ${bam} ${bam.simpleName}.bin
+alntools bam2ec ${params.bam2ec} -t ${gtf.simpleName}_transcripts_lengths.tsv -c 8 ${bam} ${bam.simpleName}.bin
 """
 }
\ No newline at end of file