diff --git a/conf/maps.xml.example b/conf/maps.xml.example
index 0103dd0ef4..ea62c97c1e 100644
--- a/conf/maps.xml.example
+++ b/conf/maps.xml.example
@@ -1,3 +1,3 @@
-
+
diff --git a/data/maps/Makefile b/data/maps/Makefile
index 13c26a90c6..03e3fcb5ef 100644
--- a/data/maps/Makefile
+++ b/data/maps/Makefile
@@ -28,7 +28,7 @@ $(DATADIR)/maps.google.com: $(DATADIR) FORCE
exit 1)
$(PAPARAZZI_HOME)/conf/maps.xml: $(DATADIR)/maps.google.com
- $(eval GOOGLE_VERSION := $(shell grep -E "http://khm[0-9]+.google.com/kh/v=[0-9]+.x26" $(DATADIR)/maps.google.com | sed -E 's#.*http://khm[0-9]+.google.com/kh/v=##;s#.x26.*##'))
+ $(eval GOOGLE_VERSION := $(shell tr -s '[[:space:]]' '\n' < $(DATADIR)/maps.google.com | grep -E "http[s]?://khm[s]?[0-9]+.google.com/kh/v=[0-9]+.x26" | sed -E 's#.*http[s]?://khm[s]?[0-9]+.google.com/kh/v=##;s#.x26.*##'))
$(eval $@_TMP := $(shell $(MKTEMP)))
@echo "Updated google maps version to $(GOOGLE_VERSION)"
@echo "-----------------------------------------------"