diff --git a/bwa.wdl b/bwa.wdl
index cafba38c18a66ab55a128a16e4aa154b1b25fc02..04320ad496917384c8b6a1833d33fa7ff820f647 100644
--- a/bwa.wdl
+++ b/bwa.wdl
@@ -81,7 +81,7 @@ task mem {
         ${referenceFile} ${read1} ${read2}
     }
     output {
-        File samFile = if defined(outputFile) then outputFile else stdout()
+        File samFile = if defined(outputFile) then select_first([outputFile]) else stdout()
     }
     runtime {
         cpu: select_first([threads])
diff --git a/spades.wdl b/spades.wdl
index fd9b4ed529f0654f14488e351c0cb571df9a12d6..e4a150c2e5882ab6cd72ee257b8053f047d83c33 100644
--- a/spades.wdl
+++ b/spades.wdl
@@ -63,7 +63,7 @@ task spades {
         ${"--phred-offset " + phredOffset }
     }
     output {
-        Array[File] correctedReads = glob_wildcard(outputDir + "/corrected/*.fastq*")
+        Array[File] correctedReads = glob(outputDir + "/corrected/*.fastq*")
         File scaffolds = outputDir + "/scaffolds.fasta"
         File contigs = outputDir + "/contigs.fasta"
         File assemblyGraphGfa = outputDir + "/assembly_graph.gfa"