diff --git a/src/vte.c b/src/vte.c
index dcff4d2..2e7f60e 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -8495,6 +8495,8 @@ vte_terminal_finalize(GObject *object)
 
 	/* Free background info. */
 	g_free(terminal->pvt->bg_file);
+	if (pvt->bg_pixbuf)
+		g_object_unref (pvt->bg_pixbuf);
 
 	/* Free the font description. */
 	if (terminal->pvt->fontdesc != NULL) {
diff --git a/src/vtebg.c b/src/vtebg.c
index d5ebe75..40cde6d 100644
--- a/src/vtebg.c
+++ b/src/vtebg.c
@@ -462,7 +462,7 @@ vte_bg_get_surface(VteBg *bg,
 	case VTE_BG_SOURCE_ROOT:
 		break;
 	case VTE_BG_SOURCE_PIXBUF:
-		item->source_pixbuf = g_object_ref (source_pixbuf);
+		item->source_pixbuf = source_pixbuf;
 		pixbuf = g_object_ref (source_pixbuf);
 		break;
 	case VTE_BG_SOURCE_FILE:
