diff --git a/e-util/e-alert-bar.c b/e-util/e-alert-bar.c
index 233de93..a764a02 100644
--- a/e-util/e-alert-bar.c
+++ b/e-util/e-alert-bar.c
@@ -51,10 +51,23 @@ G_DEFINE_TYPE (
 static void
 alert_bar_response_close (EAlert *alert)
 {
+	printf ("%s: %p\n", __FUNCTION__, alert);
 	e_alert_response (alert, GTK_RESPONSE_CLOSE);
 }
 
 static void
+alerts_close_widget_gone_cb (gpointer user_data, GObject *what)
+{
+	printf ("   %s: %p alert:%p\n", __FUNCTION__, what, user_data);
+}
+
+static void
+alert_is_gone (gpointer user_data, GObject *what)
+{
+	printf ("   %s: %p\n", __FUNCTION__, what);
+}
+
+static void
 alert_bar_show_alert (EAlertBar *alert_bar)
 {
 	GtkImage *image;
@@ -122,6 +135,8 @@ alert_bar_show_alert (EAlertBar *alert_bar)
 		GTK_BUTTON_BOX (action_area), widget, TRUE);
 	gtk_widget_show (widget);
 
+	g_object_weak_ref ((GObject *) widget, alerts_close_widget_gone_cb, alert);
+	g_object_weak_ref ((GObject *) alert, alert_is_gone, NULL);
 	g_signal_connect_swapped (
 		widget, "clicked",
 		G_CALLBACK (alert_bar_response_close), alert);
@@ -135,6 +150,8 @@ alert_bar_show_alert (EAlertBar *alert_bar)
 	if (secondary_text == NULL)
 		secondary_text = "";
 
+	printf ("%s: attaching signal to %p and altert:%p (%s|%s)\n", __FUNCTION__, widget, alert, primary_text, secondary_text);
+
 	have_primary_text = (*primary_text != '\0');
 	have_secondary_text = (*secondary_text != '\0');
 
@@ -202,9 +219,25 @@ alert_bar_response_cb (EAlert *alert,
 	if (g_queue_remove (queue, alert))
 		g_object_unref (alert);
 
-	if (g_queue_is_empty (queue))
+	printf ("%s: %p: was-head:%d queue empty:%d\n", __FUNCTION__, alert, was_head, g_queue_is_empty (queue));
+	if (g_queue_is_empty (queue)) {
+		GtkWidget *action_area;
+		GList *children;
+
 		gtk_widget_hide (GTK_WIDGET (alert_bar));
-	else if (was_head) {
+
+		if (g_getenv ("EVO_REMOVE_BUTTONS")) {
+			action_area = gtk_info_bar_get_action_area (GTK_INFO_BAR (alert_bar));
+
+			/* Remove all buttons from the previous alert. */
+			children = gtk_container_get_children (GTK_CONTAINER (action_area));
+			while (children != NULL) {
+				GtkWidget *child = GTK_WIDGET (children->data);
+				gtk_container_remove (GTK_CONTAINER (action_area), child);
+				children = g_list_delete_link (children, children);
+			}
+		}
+	} else if (was_head) {
 		GtkInfoBar *info_bar = GTK_INFO_BAR (alert_bar);
 		gtk_info_bar_response (info_bar, response_id);
 		alert_bar_show_alert (alert_bar);
@@ -346,6 +379,7 @@ e_alert_bar_clear (EAlertBar *alert_bar)
 
 	queue = &alert_bar->priv->alerts;
 
+	printf ("%s: clearing the bar...\n", __FUNCTION__);
 	while ((alert = g_queue_pop_head (queue)) != NULL)
 		alert_bar_response_close (alert);
 }
@@ -420,6 +454,7 @@ e_alert_bar_close_alert (EAlertBar *alert_bar)
 	alert = g_queue_peek_head (&alert_bar->priv->alerts);
 
 	if (alert != NULL) {
+		printf ("%s: %p\n", __FUNCTION__, alert);
 		alert_bar_response_close (alert);
 		alert_closed = TRUE;
 	}
