diff --git a/atspi/atspi-misc.c b/atspi/atspi-misc.c
index 11c4d0f..9658d1d 100644
--- a/atspi/atspi-misc.c
+++ b/atspi/atspi-misc.c
@@ -1668,6 +1668,7 @@ atspi_set_main_context (GMainContext *cnx)
   }
   atspi_main_context = cnx;
   atspi_dbus_connection_setup_with_g_main (atspi_get_a11y_bus (), cnx);
+  dbind_set_main_context (cnx);
 }
 
 #ifdef DEBUG_REF_COUNTS
diff --git a/dbind/dbind.c b/dbind/dbind.c
index 98467e6..464eea6 100644
--- a/dbind/dbind.c
+++ b/dbind/dbind.c
@@ -28,6 +28,7 @@
 #include "atspi/atspi-gmain.h"
 
 static int dbind_timeout = -1;
+static GMainContext *dbind_main_context;
 
 /*
  * FIXME: compare types - to ensure they match &
@@ -39,6 +40,8 @@ static int dbind_timeout = -1;
 typedef struct _SpiReentrantCallClosure 
 {
   DBusMessage *reply;
+  GMainLoop *loop;
+  guint timeout;
 } SpiReentrantCallClosure;
 
 static void
@@ -48,6 +51,17 @@ set_reply (DBusPendingCall * pending, void *user_data)
 
   closure->reply = dbus_pending_call_steal_reply (pending);
   dbus_pending_call_unref (pending);
+  g_main_loop_quit (closure->loop);
+}
+
+static gboolean
+timeout_reply (void *data)
+{
+  SpiReentrantCallClosure *closure = data;
+
+  g_main_loop_quit (closure->loop);
+  closure->timeout = -1;
+  return FALSE;
 }
 
 static gint
@@ -63,63 +77,29 @@ DBusMessage *
 dbind_send_and_allow_reentry (DBusConnection * bus, DBusMessage * message, DBusError *error)
 {
   DBusPendingCall *pending;
-  SpiReentrantCallClosure *closure;
-  const char *unique_name = dbus_bus_get_unique_name (bus);
-  const char *destination = dbus_message_get_destination (message);
-  struct timeval tv;
-  DBusMessage *ret;
-  static gboolean in_dispatch = FALSE;
+  SpiReentrantCallClosure closure;
+  GSource *source;
 
-  if (unique_name && destination &&
-      strcmp (destination, unique_name) != 0)
-    {
-      ret = dbus_connection_send_with_reply_and_block (bus, message,
-                                                       dbind_timeout, error);
-      if (g_main_depth () == 0 && !in_dispatch)
-      {
-        in_dispatch = TRUE;
-        while (dbus_connection_dispatch (bus) == DBUS_DISPATCH_DATA_REMAINS);
-        in_dispatch = FALSE;
-      }
-      return ret;
-    }
+  closure.loop = g_main_loop_new (NULL, FALSE);
+  closure.reply = NULL;
 
-  closure = g_new0 (SpiReentrantCallClosure, 1);
-  closure->reply = NULL;
-  if (!dbus_connection_send_with_reply (bus, message, &pending, dbind_timeout)
-      || !pending)
+  if (!dbus_connection_send_with_reply (bus, message, &pending, 9000) || !pending)
     {
-      g_free (closure);
       return NULL;
     }
-  dbus_pending_call_set_notify (pending, set_reply, (void *) closure, g_free);
-
-  closure->reply = NULL;
-  gettimeofday (&tv, NULL);
-  dbus_pending_call_ref (pending);
-  while (!closure->reply)
-    {
-      if (!dbus_connection_read_write_dispatch (bus, dbind_timeout))
-        {
-          //dbus_pending_call_set_notify (pending, NULL, NULL, NULL);
-          dbus_pending_call_cancel (pending);
-          dbus_pending_call_unref (pending);
-          return NULL;
-        }
-      if (time_elapsed (&tv) > dbind_timeout)
-        {
-          //dbus_pending_call_set_notify (pending, NULL, NULL, NULL);
-          dbus_pending_call_cancel (pending);
-          dbus_pending_call_unref (pending);
-          dbus_set_error_const (error, "org.freedesktop.DBus.Error.NoReply",
-                                "timeout from dbind");
-          return NULL;
-        }
-    }
+  dbus_pending_call_set_notify (pending, set_reply, (void *) &closure, NULL);
+  source = g_timeout_source_new (500);
+  g_source_set_callback (source, timeout_reply, &closure, NULL);
+  closure.timeout = g_source_attach (source, dbind_main_context);
+  g_source_unref (source);
+  g_main_loop_run  (closure.loop);
+  if (closure.timeout != -1)
+    g_source_destroy (source);
   
-  ret = closure->reply;
-  dbus_pending_call_unref (pending);
-  return ret;
+  g_main_loop_unref (closure.loop);
+  if (!closure.reply)
+    dbus_pending_call_cancel (pending);
+  return closure.reply;
 }
 
 dbus_bool_t
@@ -329,5 +309,10 @@ dbind_set_timeout (int timeout)
   dbind_timeout = timeout;
 }
 
+void
+dbind_set_main_context (GMainContext *cnx)
+{
+  dbind_main_context = cnx;
+}
 
 /*END------------------------------------------------------------------------*/
diff --git a/dbind/dbind.h b/dbind/dbind.h
index f7298d0..4450f44 100644
--- a/dbind/dbind.h
+++ b/dbind/dbind.h
@@ -66,4 +66,6 @@ dbind_emit_signal (DBusConnection *cnx,
                    ...);
 
 void dbind_set_timeout (int timeout);
+
+void dbind_set_main_context (GMainContext *cnx);
 #endif /* _DBIND_H_ */
