diff --git a/fastqc.wdl b/fastqc.wdl
index a4cde2519ec3b21f3e3c7122326aaccd67dc0293..635fa7493db98636d686e2cad05e7dbea7cb68a2 100644
--- a/fastqc.wdl
+++ b/fastqc.wdl
@@ -16,7 +16,7 @@ task fastqc {
     Int? kmers
     String? dir
     # Chops of the .gz extension if present.
-    String name = sub(sub(sub(seqFile, "\\.gz$",""), "\\.fq$",""), "\\.fastq$","")
+    String name = sub(sub(seqFile, "\\.gz$",""), "\\.fq$|\\.fastq$","")
     # This regex chops of the extension and replaces it with _fastqc for the reportdir.
     # Just as fastqc does it.
     String reportDir = outdirPath + "/" + sub(basename(name), "\\.[^\\.]*$", "_fastqc")