diff --git a/biopet/bamstats.wdl b/biopet/bamstats.wdl
index df919ef82352df4c73b4ec6efe290c2d5b34784b..d48e55f6893b1b8ce44a6309a91bca8e5d368811 100644
--- a/biopet/bamstats.wdl
+++ b/biopet/bamstats.wdl
@@ -15,7 +15,7 @@ task Generate {
         Boolean tsvOutputs = false
         String outputDir
         Reference? reference
-        Int memory = 4
+        Int memory = 8
         Float memoryMultiplier = 2.0
     }
 
diff --git a/fastqc.wdl b/fastqc.wdl
index f1d23885f210e73b2452be62b499ca6ab553ed85..3a3b1110f6836104e9960a019ec241bac056326e 100644
--- a/fastqc.wdl
+++ b/fastqc.wdl
@@ -21,10 +21,10 @@ task Fastqc {
     }
 
     # Chops of the .gz extension if present.
-    String name = sub(seqFile, "\.gz$","")
+    String name = basename(sub(seqFile, "\.gz$","")) # The Basename needs to be taken here. Otherwise paths might differ between similar jobs.
     # 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")
+    String reportDir = outdirPath + "/" + sub(name, "\.[^\.]*$", "_fastqc")
 
     command {
         set -e -o pipefail