diff --git a/modules/other/gail/gailcontainer.c b/modules/other/gail/gailcontainer.c
index 2c64b37..b547d44 100644
--- a/modules/other/gail/gailcontainer.c
+++ b/modules/other/gail/gailcontainer.c
@@ -224,12 +224,6 @@ gail_container_real_initialize (AtkObject *obj,
    * need to remove these handlers.
    */
   handler_id = g_signal_connect (data,
-                                 "add",
-                                 G_CALLBACK (gail_container_add_gtk),
-                                 obj);
-  g_object_set_data (G_OBJECT (obj), "gail-add-handler-id", 
-                     GUINT_TO_POINTER (handler_id));
-  handler_id = g_signal_connect (data,
                                  "remove",
                                  G_CALLBACK (gail_container_remove_gtk),
                                  obj);
diff --git a/modules/other/gail/gailwidget.c b/modules/other/gail/gailwidget.c
index 4bd31dd..50c24a9 100644
--- a/modules/other/gail/gailwidget.c
+++ b/modules/other/gail/gailwidget.c
@@ -107,6 +107,15 @@ static void       gail_widget_real_initialize    (AtkObject     *obj,
 static GtkWidget* gail_widget_find_viewport      (GtkWidget     *widget);
 static gboolean   gail_widget_on_screen          (GtkWidget     *widget);
 static gboolean   gail_widget_all_parents_visible(GtkWidget     *widget);
+static gboolean gail_widget_parent_set_hook (GSignalInvocationHint *ihint,
+                                             guint n_param_values,
+                                             const GValue *param_values,
+                                             gpointer data);
+static gboolean gail_widget_add_items (gpointer data);
+static void gail_widget_add_item (GtkWidget *this_widget);
+
+static GQueue *add_queue;
+static guint add_idle = 0;
 
 G_DEFINE_TYPE_WITH_CODE (GailWidget, gail_widget, GTK_TYPE_ACCESSIBLE,
                          G_IMPLEMENT_INTERFACE (ATK_TYPE_COMPONENT, atk_component_interface_init))
@@ -128,6 +137,11 @@ gail_widget_class_init (GailWidgetClass *klass)
   class->ref_state_set = gail_widget_ref_state_set;
   class->get_index_in_parent = gail_widget_get_index_in_parent;
   class->initialize = gail_widget_real_initialize;
+
+  g_signal_add_emission_hook (
+         g_signal_lookup ("parent-set", GTK_TYPE_WIDGET), 0,
+             gail_widget_parent_set_hook, NULL, (GDestroyNotify) NULL);
+  add_queue = g_queue_new ();
 }
 
 static void
@@ -135,6 +149,60 @@ gail_widget_init (GailWidget *accessible)
 {
 }
 
+static gboolean
+gail_widget_parent_set_hook (GSignalInvocationHint *ihint,
+                              guint n_param_values,
+                              const GValue *param_values, gpointer data)
+{
+  GtkWidget *widget = GTK_WIDGET (g_value_get_object (&param_values [0]));
+
+  if (!add_idle)
+    {
+      add_idle = g_idle_add (gail_widget_add_items, NULL);
+    }
+  g_object_ref (widget);
+  g_queue_push_tail (add_queue, widget);
+  return TRUE;
+}
+
+static gboolean
+gail_widget_add_items (gpointer data)
+{
+  while (!g_queue_is_empty (add_queue))
+    {
+      GtkWidget *widget = GTK_WIDGET (g_queue_pop_head (add_queue));
+      if (G_OBJECT (widget)->ref_count > 1)
+        gail_widget_add_item (widget);
+      g_object_unref (widget);
+    }
+  add_idle = 0;
+  return FALSE;
+}
+
+static void
+gail_widget_add_item (GtkWidget *this_widget)
+{
+  AtkObject *parent;
+
+  GtkWidget *new_parent = gtk_widget_get_parent(this_widget);
+if(new_parent == NULL)
+    return;
+
+  parent = gtk_widget_get_accessible (new_parent);
+  if (GAIL_IS_CONTAINER (parent))
+    {
+      GailContainer *parent_container = GAIL_CONTAINER (parent);
+      GailContainerClass *container_class;
+      if (parent_container)
+        {
+          container_class = GAIL_CONTAINER_GET_CLASS (parent_container);
+          if (container_class->add_gtk)
+            (*container_class->add_gtk) (GTK_CONTAINER (new_parent), this_widget, parent);
+        }
+    }
+  return;
+}
+
 /**
  * This function  specifies the GtkWidget for which the GailWidget was created 
  * and specifies a handler to be called when the GtkWidget is destroyed.
