diff --git a/bwa.wdl b/bwa.wdl
index 774f9321638f9543330ea6a7c644196af69e809b..53c38f02a6e45664935405c6b8e08496f821377b 100644
--- a/bwa.wdl
+++ b/bwa.wdl
@@ -22,7 +22,7 @@ task BwaMem {
         File bamFile = outputPath
     }
     runtime{
-        threads: select_first([threads])
+        threads: if defined(threads) then threads else 1
         memory: if defined(memory) then memory else 8
     }
 }
diff --git a/fastqc.wdl b/fastqc.wdl
index d14faf9120932e03b64d8741a7496c3d8934d558..7dddd5dd3df644810b958474e2f9886fe127d8ae 100644
--- a/fastqc.wdl
+++ b/fastqc.wdl
@@ -65,7 +65,7 @@ task extractAdapters {
     command {
     set -e
     mkdir -p ${outputDir}
-    java -Xmx3G -jar ${extractAdaptersFastqcJar} \
+    java -Xmx4G -jar ${extractAdaptersFastqcJar} \
     --inputFile ${inputFile} \
     ${"--adapterOutputFile " + adapterOutputFilePath } \
     ${"--contamsOutputFile " + contamsOutputFilePath } \