diff --git a/MAVProxy/modules/mavproxy_map/__init__.py b/MAVProxy/modules/mavproxy_map/__init__.py
index <HASH>..<HASH> 100644
--- a/MAVProxy/modules/mavproxy_map/__init__.py
+++ b/MAVProxy/modules/mavproxy_map/__init__.py
@@ -165,6 +165,7 @@ def map_callback(obj):
 
 def unload():
     '''unload module'''
+    mpstate.map.close()
     mpstate.map = None
     mpstate.map_functions = {}
 
diff --git a/MAVProxy/modules/mavproxy_map/mp_slipmap.py b/MAVProxy/modules/mavproxy_map/mp_slipmap.py
index <HASH>..<HASH> 100755
--- a/MAVProxy/modules/mavproxy_map/mp_slipmap.py
+++ b/MAVProxy/modules/mavproxy_map/mp_slipmap.py
@@ -502,6 +502,8 @@ class MPSlipMap():
         if self.is_alive():
             self.child.join(2)
 
+        self.child.terminate()
+
     def is_alive(self):
         '''check if graph is still going'''
         return self.child.is_alive()
map: Map window now closes when module is unloaded.