diff --git a/samtools.wdl b/samtools.wdl
index 8a5e065594062c92064fd3f82702e1e51a9e270f..ff2daf0d74058fab973c1b523c6bc1553aa71734 100644
--- a/samtools.wdl
+++ b/samtools.wdl
@@ -25,22 +25,22 @@ task BgzipAndIndex {
 task Index {
     input {
         String? preCommand
-        File bamFilePath
+        File bamFile
         String? bamIndexPath
     }
 
     command {
         set -e -o pipefail
         ~{preCommand}
-        samtools index ~{bamFilePath} ~{bamIndexPath}
+        samtools index ~{bamFile} ~{bamIndexPath}
     }
 
     output {
         IndexedBamFile outputBam = object {
-          file: bamFilePath,
+          file: bamFile,
           index: if defined(bamIndexPath)
                               then select_first([bamIndexPath])
-                              else bamFilePath + ".bai"
+                              else bamFile + ".bai"
         }
     }
 }