diff --git a/src/preferences.ui b/src/preferences.ui
index 960cc815..01a4877f 100644
--- a/src/preferences.ui
+++ b/src/preferences.ui
@@ -253,17 +253,22 @@
             <property name="can_focus">False</property>
             <property name="spacing">12</property>
             <child>
-              <object class="GtkScrolledWindow">
+              <object class="GtkFrame">
                 <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="hscrollbar_policy">never</property>
                 <child>
-                  <object class="GtkViewport">
+                  <object class="GtkScrolledWindow">
                     <property name="visible">True</property>
-                    <property name="can_focus">False</property>
+                    <property name="can_focus">True</property>
+                    <property name="hscrollbar_policy">never</property>
                     <child>
-                      <object class="GtkListBox" id="the-listbox">
+                      <object class="GtkViewport">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <child>
+                          <object class="GtkListBox" id="the-listbox">
+                            <property name="visible">True</property>
+                          </object>
+                        </child>
                       </object>
                     </child>
                   </object>
@@ -285,8 +290,8 @@
                           <object class="GtkBox">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="orientation">vertical</property>
                             <property name="border_width">12</property>
+                            <property name="orientation">vertical</property>
                             <property name="spacing">6</property>
                             <child>
                               <object class="GtkCheckButton" id="default-show-menubar-checkbutton">
@@ -354,21 +359,8 @@
                                     <property name="xalign">0</property>
                                   </object>
                                   <packing>
-                                    <property name="left_attach">0</property>
                                     <property name="top_attach">0</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkLabel" id="new-terminal-mode-label">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="label" translatable="yes">Open _new terminals in:</property>
-                                    <property name="use_underline">True</property>
-                                    <property name="mnemonic_widget">new-terminal-mode-combobox</property>
-                                  </object>
-                                  <packing>
                                     <property name="left_attach">0</property>
-                                    <property name="top_attach">1</property>
                                   </packing>
                                 </child>
                                 <child>
@@ -385,8 +377,21 @@
                                     </child>
                                   </object>
                                   <packing>
-                                    <property name="left_attach">1</property>
                                     <property name="top_attach">0</property>
+                                    <property name="left_attach">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" id="new-terminal-mode-label">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label" translatable="yes">Open _new terminals in:</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="mnemonic_widget">new-terminal-mode-combobox</property>
+                                  </object>
+                                  <packing>
+                                    <property name="top_attach">1</property>
+                                    <property name="left_attach">0</property>
                                   </packing>
                                 </child>
                                 <child>
@@ -403,8 +408,8 @@
                                     </child>
                                   </object>
                                   <packing>
-                                    <property name="left_attach">1</property>
                                     <property name="top_attach">1</property>
+                                    <property name="left_attach">1</property>
                                   </packing>
                                 </child>
                               </object>
diff --git a/src/terminal-prefs.c b/src/terminal-prefs.c
index d17defca..e0e28d54 100644
--- a/src/terminal-prefs.c
+++ b/src/terminal-prefs.c
@@ -43,7 +43,6 @@ static void
 prefs_dialog_help_button_clicked_cb (GtkWidget *button,
                                      PrefData *data)
 {
-  // FIXME merge the "profile" and "pref" help pages
   terminal_util_show_help ("pref");
 }
 
@@ -56,7 +55,6 @@ prefs_dialog_close_button_clicked_cb (GtkWidget *button,
 
 /* Sidebar */
 
-// FIXME copied from terminal-window.c, maybe move to terminal-util.c.
 static inline GSimpleAction *
 lookup_action (GtkWindow *window,
                const char *name)
@@ -118,7 +116,7 @@ update_window_title (void)
     subtitle = g_strdup_printf (_("Profile “%s”"), text);
   }
 
-  title = g_strdup_printf (_("GNOME Terminal Preferences – %s"), subtitle);
+  title = g_strdup_printf (_("Preferences – %s"), subtitle);
   gtk_window_set_title (GTK_WINDOW (the_pref_data->dialog), title);
 }
 
@@ -136,6 +134,7 @@ listbox_row_selected_cb (GtkListBox *box,
     the_pref_data->selected_profile_uuid = g_strdup (g_object_get_data (G_OBJECT (row), "uuid"));
   } else {
     the_pref_data->selected_profile = NULL;
+    the_pref_data->selected_profile_uuid = NULL;
   }
   the_pref_data->selected_list_box_row = row;
 
@@ -173,7 +172,7 @@ listbox_select_profile (const char *uuid)
 {
   GtkListBoxRow *row;
   for (int i = 0; (row = gtk_list_box_get_row_at_index (the_pref_data->listbox, i)) != NULL; i++) {
-    char *rowuuid = g_object_get_data (G_OBJECT (row), "uuid");
+    const char *rowuuid = g_object_get_data (G_OBJECT (row), "uuid");
     if (g_strcmp0 (rowuuid, uuid) == 0) {
       g_signal_emit_by_name (row, "activate");
       return TRUE;
@@ -278,7 +277,9 @@ popover_dialog_cancel_clicked_cb (GtkButton *button,
                                         G_CALLBACK (popover_dialog_cancel_clicked_cb), NULL);
 
   GtkPopover *popover_dialog = GTK_POPOVER (gtk_builder_get_object (the_pref_data->builder, "popover-dialog"));
-  gtk_widget_hide (GTK_WIDGET (popover_dialog));  // FIXME popdown if gtk >= 3.22 ?
+
+  /* FIXME use gtk_popover_popdown, see the comment at the corresponding gtk_widget_show */
+  gtk_widget_hide (GTK_WIDGET (popover_dialog));
 }
 
 static void
@@ -289,7 +290,6 @@ popover_dialog_ok_clicked_cb (GtkButton *button,
   const char *name = gtk_entry_get_text (entry);
 
   /* Perform what we came for */
-  // FIXME can we use GCallback here instead of plain C? Would it make sense?
   (*fn) (name);
 
   /* Do anything we'd do if "cancel" was clicked */
@@ -300,11 +300,11 @@ popover_dialog_ok_clicked_cb (GtkButton *button,
 /* Updates the OK button's sensitivity (insensitive if entry field is empty or whitespace only).
  * The entry's initial value and OK's initial sensitivity have to match in the .ui file. */
 static void
-popover_dialog_notify_text_cb (GtkEntryBuffer *buffer,
-                               GParamSpec     *pspec,
-                               GtkWidget      *ok)
+popover_dialog_notify_text_cb (GtkEntry   *entry,
+                               GParamSpec *pspec,
+                               GtkWidget  *ok)
 {
-  gs_free char *text = g_strchomp (g_strdup (gtk_entry_buffer_get_text (buffer)));
+  gs_free char *text = g_strchomp (g_strdup (gtk_entry_get_text (entry)));
   gtk_widget_set_sensitive (ok, text[0] != '\0');
 }
 
@@ -345,7 +345,13 @@ profile_popup_dialog (GtkWidget *relative_to,
   gtk_popover_set_relative_to (popover_dialog, relative_to);
   gtk_popover_set_position (popover_dialog, GTK_POS_BOTTOM);
   gtk_popover_set_default_widget (popover_dialog, GTK_WIDGET (ok));
-  gtk_widget_show (GTK_WIDGET (popover_dialog));  // FIXME popup if gtk >= 3.22 ?
+
+  /* FIXME use gtk_popover_popup/popdown with GTK+ >= 3.22.
+   * With this change, deletion of a profile rarely renamed it to "." instead (the text
+   * used in the hidden entry widget at delete confirmation). I couldn't reliably reproduce it.
+   * Must have something to do with the asynchronous nature of popup/popdown, e.g. the button
+   * getting pressed during popup/popdown animation, or something similarly nasty... */
+  gtk_widget_show (GTK_WIDGET (popover_dialog));
 
   gtk_widget_grab_focus (entry_text != NULL ? GTK_WIDGET (entry) : GTK_WIDGET (cancel));
 }
@@ -371,7 +377,7 @@ profile_clone_cb (GSimpleAction *simple,
 {
   const char *name = g_settings_get_string (the_pref_data->selected_profile, TERMINAL_PROFILE_VISIBLE_NAME_KEY);
 
-  gs_free char *label = g_strdup_printf (_("Enter name for new profile created as a clone of profile “%s”:"), name);
+  gs_free char *label = g_strdup_printf (_("Enter name for new profile based on “%s”:"), name);
   gs_free char *clone_name = g_strdup_printf (_("%s (Copy)"), name);
 
   profile_popup_dialog (GTK_WIDGET (the_pref_data->selected_list_box_row),
@@ -517,9 +523,9 @@ listbox_create_row (const char *name,
   // intermittently at random places. Give it another try.
   GMenu *model = g_menu_new ();
   GMenu *model_section = g_menu_new ();
-  g_menu_append (model_section, _("Clone…"), "win.clone");
-  g_menu_append (model_section, _("Rename…"), "win.rename");
-  g_menu_append (model_section, _("Delete…"), "win.delete");
+  g_menu_append (model_section, _("_Clone…"), "win.clone");
+  g_menu_append (model_section, _("_Rename…"), "win.rename");
+  g_menu_append (model_section, _("_Delete…"), "win.delete");
   g_menu_append_section (model, NULL, G_MENU_MODEL (model_section));
 
   model_section = g_menu_new ();
@@ -819,9 +825,8 @@ terminal_prefs_show_preferences (GSettings *profile, const char *widget_name)
                             G_CALLBACK (listbox_update), data->listbox);
 
   GtkEntry *entry = GTK_ENTRY (gtk_builder_get_object (the_pref_data->builder, "popover-dialog-entry"));
-  GtkEntryBuffer *buffer = gtk_entry_get_buffer (entry);
   GtkButton *ok = GTK_BUTTON (gtk_builder_get_object (the_pref_data->builder, "popover-dialog-ok"));
-  g_signal_connect (buffer, "notify::text", G_CALLBACK (popover_dialog_notify_text_cb), ok);
+  g_signal_connect (entry, "notify::text", G_CALLBACK (popover_dialog_notify_text_cb), ok);
 
   /* General page */
 
