diff --git a/download-latest-firmware-build.py b/download-latest-firmware-build.py
index 05c30437466fed5a5d014441a9a85c12794303a6..d126b83f2184749d9ecbf01d9c21e6086d65ad26 100755
--- a/download-latest-firmware-build.py
+++ b/download-latest-firmware-build.py
@@ -31,7 +31,7 @@ def find_version_from_archive(archive_file_list):
             version_regex = re.compile(r'gluon-ffs-(((experimental|[0-9]+\.[0-9])+[+][0-9]{4}-[0-9]{2}-[0-9]{2})-g\.[a-f0-9]+-s\.[a-f0-9]+-)')
             version_matches = version_regex.match(filename)
             if version_matches:
-                logging.debug("Found version number {}".format(version_matches.group(2)))
+                logging.debug("Found version number {}".format(version_matches.group(1)))
                 return version_matches.group(2)
     raise ValueError("Could not determine version from ZIP file")