diff --git a/gnome/src/accountlist.c b/gnome/src/accountlist.c
index 0c3840910c41854993abfa00778701a1bacc77bd..91b649826b84b6265244fc50a6763472fbb780c7 100644
--- a/gnome/src/accountlist.c
+++ b/gnome/src/accountlist.c
@@ -233,8 +233,15 @@ const gchar* account_list_get_current_id(void)
 void account_list_remove(const gchar *accountID)
 {
     account_t *target = account_list_get_by_id(accountID);
-    if (target && !g_queue_remove(accountQueue, target))
-        ERROR("Could not remove account with ID %s", accountID);
+    if (target) {
+#if GLIB_CHECK_VERSION(2, 30, 0)
+        if (!g_queue_remove(accountQueue, target))
+            ERROR("Could not remove account with ID %s", accountID);
+#else
+        g_queue_remove(accountQueue, target);
+#endif
+    }
+
 }
 
 gchar * account_list_get_ordered_list(void)