diff --git a/cflib_groundstation/crazyflie_connection.py b/cflib_groundstation/crazyflie_connection.py
index 7c7b9870d92611b205758f8346bf910dda3e4320..25eefc28d5965eb27e516e9f1f23aca92b59607d 100644
--- a/cflib_groundstation/crazyflie_connection.py
+++ b/cflib_groundstation/crazyflie_connection.py
@@ -82,6 +82,8 @@ class CrazyflieConnection:
             self.scf.close_link()
             self.scf = None
             self.is_connected = False
+        # disconnect the commander from setpointhandler
+        self.setpoint_handler.disconnectCommander()
 
     def Debug():
         raise Exception
@@ -171,12 +173,10 @@ class CrazyflieConnection:
             if self.scf.is_link_open():
                 val = self.scf.cf.param.values[group][name]
     
-
         except AttributeError:
             val = -1.234567
             pass
 
-            
         data = bytearray(group)
         data.append(name)
         data.append(val)