diff --git a/src/nf_modules/kb/main.nf b/src/nf_modules/kb/main.nf
index 2df29caa55cdede8aaa143fc84551e28d0fcb1c9..9e4cfec24366f1e01add17a5738e4ec0d2ff44fb 100644
--- a/src/nf_modules/kb/main.nf
+++ b/src/nf_modules/kb/main.nf
@@ -37,7 +37,8 @@ process tr2g {
   script:
   """
   t2g.py --gtf ${gtf}
-  uniq t2g_dup.txt > t2g.txt
+  sort -u t2g_dup.txt > t2g.txt
+  rm t2g_dup.txt
   """
 }