diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c
index 4b4761f..2dddb3b 100644
--- a/src/prefs-dialog.c
+++ b/src/prefs-dialog.c
@@ -1384,6 +1384,18 @@ custom_homepage_set_mapping (const GValue       *value,
 
   if (!g_value_get_boolean (value)) {
     gtk_widget_set_sensitive (dialog->custom_homepage_entry, FALSE);
+
+    if (gtk_toggle_button_get_active 
+       (GTK_TOGGLE_BUTTON (dialog->new_tab_homepage_radiobutton)))
+      gtk_entry_set_text (GTK_ENTRY (dialog->custom_homepage_entry), "");
+    else if (gtk_toggle_button_get_active
+            (GTK_TOGGLE_BUTTON (dialog->blank_homepage_radiobutton))) {
+      gtk_entry_set_text (GTK_ENTRY (dialog->custom_homepage_entry), "");
+      g_settings_set_string (EPHY_SETTINGS_MAIN, EPHY_PREFS_HOMEPAGE_URL, "about:blank");
+      gtk_toggle_button_set_active 
+        (GTK_TOGGLE_BUTTON (dialog->blank_homepage_radiobutton), TRUE);
+    }
+
     return NULL;
   }
 
