diff --git a/droneapi/module/api.py b/droneapi/module/api.py
index <HASH>..<HASH> 100644
--- a/droneapi/module/api.py
+++ b/droneapi/module/api.py
@@ -386,11 +386,11 @@ class APIModule(mp_module.MPModule):
 
     def fix_targets(self, message):
         """Set correct target IDs for our vehicle"""
-        status = self.mpstate.status
+        settings = self.mpstate.settings
         if hasattr(message, 'target_system'):
-            message.target_system = status.target_system
+            message.target_system = settings.target_system
         if hasattr(message, 'target_component'):
-            message.target_component = status.target_component
+            message.target_component = settings.target_component
 
     def __on_change(self, *args):
         for a in args:
Fixed the error "AttributeError: 'MPStatus' object has no attribute
'target_system'" when trying to send a mavlink message.