diff --git a/tests/hwsim/test_dbus.py b/tests/hwsim/test_dbus.py
index 3ff911364..ba310ebed 100644
--- a/tests/hwsim/test_dbus.py
+++ b/tests/hwsim/test_dbus.py
@@ -1462,8 +1462,13 @@ def test_dbus_remove_connected(dev, apdev):
                     self.state = 7
                     iface.Reconnect()
                 elif self.state == 8:
+                    if 'CurrentBSS' in properties:
+                      self.state = 10
+                      self.loop.quit()
                     self.state = 9
-                    self.loop.quit()
+            if 'CurrentBSS' in properties and self.state == 9:
+                self.state = 10
+                self.loop.quit()
 
         def run_connect(self, *args):
             logger.debug("run_connect")
@@ -1476,11 +1481,16 @@ def test_dbus_remove_connected(dev, apdev):
             return False
 
         def success(self):
-            if not self.network_added or \
-               not self.network_removed or \
-               not self.network_selected:
-                return False
-            return self.state == 9
+          if not self.network_added:
+            logger.debug("network not added")
+            return False
+          if not self.network_selected:
+            logger.debug("network not Selected")
+            return False
+          if not self.network_removed:
+            logger.debug("network not Removed")
+            return False
+          return self.state == 10
 
     with TestDbusConnect(bus) as t:
         if not t.success():
@@ -6044,6 +6054,10 @@ def test_dbus_roam(dev, apdev):
         def __init__(self, bus):
             TestDbus.__init__(self, bus)
             self.state = 0
+            self.state_complete = False
+            self.current_bss = False
+            self.roam_complete = False
+            self.dst = ""
 
         def __enter__(self):
             gobject.timeout_add(1, self.run_connect)
@@ -6055,25 +6069,38 @@ def test_dbus_roam(dev, apdev):
 
         def propertiesChanged(self, properties):
             logger.debug("propertiesChanged: %s" % str(properties))
-            if 'State' in properties and properties['State'] == "completed":
-                if self.state == 0:
+            if self.state == 0 :
+                # Wait for connected and current BSS change.
+                if self.state_complete and self.current_bss:
+                    # Trigger roam event.
+                    iface.Roam(self.dst)
                     self.state = 1
-                    cur = properties["CurrentBSS"]
-                    bss_obj = bus.get_object(WPAS_DBUS_SERVICE, cur)
-                    res = bss_obj.Get(WPAS_DBUS_BSS, 'BSSID',
-                                      dbus_interface=dbus.PROPERTIES_IFACE)
-                    bssid_str = ''
-                    for item in res:
-                        if len(bssid_str) > 0:
-                            bssid_str += ':'
-                        bssid_str += '%02x' % item
-                    dst = bssid if bssid_str == bssid2 else bssid2
-                    iface.Roam(dst)
-                elif self.state == 1:
-                    if "RoamComplete" in properties and \
-                       properties["RoamComplete"]:
-                        self.state = 2
-                        self.loop.quit()
+                    self.state_complete = False
+                else:
+                    if 'State' in properties and properties['State'] == "completed":
+                        self.state_complete = True
+                    if 'CurrentBSS' in properties:
+                        cur = properties["CurrentBSS"]
+                        bss_obj = bus.get_object(WPAS_DBUS_SERVICE, cur)
+                        res = bss_obj.Get(WPAS_DBUS_BSS, 'BSSID',
+                                            dbus_interface=dbus.PROPERTIES_IFACE)
+                        bssid_str = ''
+                        for item in res:
+                            if len(bssid_str) > 0:
+                                bssid_str += ':'
+                            bssid_str += '%02x' % item
+                        self.dst = bssid if bssid_str == bssid2 else bssid2
+                        self.current_bss = True
+            elif self.state == 1:
+                # Wait for roam event.
+                if self.state_complete and self.roam_complete:
+                    self.state = 2
+                    self.loop.quit()
+                else:
+                    if 'State' in properties and properties['State'] == "completed":
+                        self.state_complete = True
+                    if 'RoamComplete' in properties and properties['RoamComplete']:
+                        self.roam_complete = True
 
         def run_connect(self, *args):
             logger.debug("run_connect")
diff --git a/wpa_supplicant/dbus/dbus_new.c b/wpa_supplicant/dbus/dbus_new.c
index 00b38edf5..8db3407e9 100644
--- a/wpa_supplicant/dbus/dbus_new.c
+++ b/wpa_supplicant/dbus/dbus_new.c
@@ -2327,6 +2327,7 @@ void wpas_dbus_signal_prop_changed(struct wpa_supplicant *wpa_s,
 		break;
 	case WPAS_DBUS_PROP_STATE:
 		prop = "State";
+                flush = TRUE;
 		break;
 	case WPAS_DBUS_PROP_CURRENT_BSS:
 		prop = "CurrentBSS";
