diff --git a/goffice/graph/gog-graph.c b/goffice/graph/gog-graph.c
index 5b55ed8..9eda915 100644
--- a/goffice/graph/gog-graph.c
+++ b/goffice/graph/gog-graph.c
@@ -232,14 +232,23 @@ gog_graph_populate_editor (GogObject *gobj,
 		combo = go_gtk_builder_get_widget (gui, "theme_combo");
 		model = GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (combo)));
 
+		g_printerr ("Howdy %p: %d\n", model, G_OBJECT(model)->ref_count);
+
+		g_object_ref (model);
+		gtk_combo_box_set_model (GTK_COMBO_BOX (combo), NULL);
+
 		count = 0;
 		for (ptr = theme_names; ptr != NULL; ptr = ptr->next) {
+			g_printerr ("A %p: %d %d\n", model, count, G_OBJECT(model)->ref_count);
 			theme = gog_theme_registry_lookup (ptr->data);
+			g_printerr ("B %p: %d %d\n", model, count, G_OBJECT(model)->ref_count);
 			gtk_list_store_append (model, &iter);
+			g_printerr ("C %p: %d %d\n", model, count, G_OBJECT(model)->ref_count);
 			gtk_list_store_set (model, &iter,
 			                    0, gog_theme_get_local_name (theme),
 			                    1, theme,
 			                    -1);
+			g_printerr ("D %p: %d %d\n", model, count, G_OBJECT(model)->ref_count);
 			if (strcmp (ptr->data, graph_theme_name) == 0)
 				index = count;
 			count++;
@@ -254,6 +263,10 @@ gog_graph_populate_editor (GogObject *gobj,
 		go_editor_add_page (editor, box, _("Theme"));
 
 		g_slist_free (theme_names);
+		g_printerr ("Howdy %p: %d\n", model, G_OBJECT(model)->ref_count);
+
+		gtk_combo_box_set_model (GTK_COMBO_BOX (combo), GTK_TREE_MODEL (model));
+		g_object_unref (model);
 	}
 	g_object_unref (gui);
 
