diff --git a/camel/camel-imapx-server.c b/camel/camel-imapx-server.c
index a791a44..1c21844 100644
--- a/camel/camel-imapx-server.c
+++ b/camel/camel-imapx-server.c
@@ -6963,11 +6963,11 @@ imapx_parser_thread (gpointer d)
 	return NULL;
 }
 
-static gboolean
+static gpointer
 join_helper (gpointer thread)
 {
 	g_thread_join (thread);
-	return FALSE;
+	return NULL;
 }
 
 static void
@@ -7040,10 +7040,7 @@ imapx_server_dispose (GObject *object)
 
 	if (server->parser_thread) {
 		if (server->parser_thread == g_thread_self ())
-			/* Prioritize ahead of GTK+ redraws. */
-			g_idle_add_full (
-				G_PRIORITY_HIGH_IDLE,
-				&join_helper, server->parser_thread, NULL);
+			g_thread_create (join_helper, server->parser_thread, FALSE, NULL);
 		else
 			g_thread_join (server->parser_thread);
 		server->parser_thread = NULL;
