diff --git a/src/profile-editor.c b/src/profile-editor.c
index f35f72d0..1c949afa 100644
--- a/src/profile-editor.c
+++ b/src/profile-editor.c
@@ -1251,7 +1251,12 @@ terminal_profile_edit (GSettings  *profile,
 
   g_settings_bind (profile,
                    TERMINAL_PROFILE_USE_CUSTOM_COMMAND_KEY,
-                   gtk_builder_get_object (builder, "custom-command-box"),
+                   gtk_builder_get_object (builder, "custom-command-entry-label"),
+                   "sensitive",
+                   G_SETTINGS_BIND_GET | G_SETTINGS_BIND_NO_SENSITIVITY);
+  g_settings_bind (profile,
+                   TERMINAL_PROFILE_USE_CUSTOM_COMMAND_KEY,
+                   gtk_builder_get_object (builder, "custom-command-entry"),
                    "sensitive",
                    G_SETTINGS_BIND_GET | G_SETTINGS_BIND_NO_SENSITIVITY);
   g_settings_bind (profile,
diff --git a/src/profile-preferences.ui b/src/profile-preferences.ui
index 4f5d3b43..699f59b0 100644
--- a/src/profile-preferences.ui
+++ b/src/profile-preferences.ui
@@ -705,25 +705,12 @@
               </packing>
             </child>
             <child>
-              <object class="GtkVBox" id="vbox91">
+              <object class="GtkGrid">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="border_width">12</property>
-                <property name="spacing">18</property>
-                <child>
-                  <object class="GtkVBox" id="vbox80">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="spacing">6</property>
-                    <child>
-                      <object class="GtkVBox" id="vbox81">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <child>
-                          <object class="GtkVBox" id="vbox92">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="spacing">6</property>
+                <property name="column_spacing">12</property>
+                <property name="row_spacing">6</property>
                             <child>
                               <object class="GtkCheckButton" id="login-shell-checkbutton">
                                 <property name="label" translatable="yes">_Run command as a login shell</property>
@@ -731,13 +718,12 @@
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
                                 <property name="use_underline">True</property>
-                                <property name="xalign">0.5</property>
                                 <property name="draw_indicator">True</property>
                               </object>
                               <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                                <property name="position">0</property>
+                                <property name="top_attach">0</property>
+                                <property name="left_attach">0</property>
+                                <property name="width">2</property>
                               </packing>
                             </child>
                             <child>
@@ -747,80 +733,52 @@
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
                                 <property name="use_underline">True</property>
-                                <property name="xalign">0.5</property>
                                 <property name="draw_indicator">True</property>
                               </object>
                               <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                                <property name="position">1</property>
+                                <property name="top_attach">1</property>
+                                <property name="left_attach">0</property>
+                                <property name="width">2</property>
                               </packing>
                             </child>
-                            <child>
-                              <object class="GtkAlignment" id="custom-command-box">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="left_padding">12</property>
-                                <child>
-                                  <object class="GtkHBox" id="hbox134">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="spacing">12</property>
                                     <child>
                                       <object class="GtkLabel" id="custom-command-entry-label">
                                         <property name="visible">True</property>
                                         <property name="can_focus">False</property>
                                         <property name="label" translatable="yes">Custom co_mmand:</property>
                                         <property name="use_underline">True</property>
-                                        <property name="justify">center</property>
                                         <property name="mnemonic_widget">custom-command-entry</property>
                                         <property name="xalign">0</property>
+                                        <property name="margin_start">12</property>
                                       </object>
                                       <packing>
-                                        <property name="expand">False</property>
-                                        <property name="fill">False</property>
-                                        <property name="position">0</property>
+                                        <property name="top_attach">2</property>
+                                        <property name="left_attach">0</property>
                                       </packing>
                                     </child>
                                     <child>
                                       <object class="GtkEntry" id="custom-command-entry">
                                         <property name="visible">True</property>
                                         <property name="can_focus">True</property>
+                                        <property name="hexpand">True</property>
                                       </object>
                                       <packing>
-                                        <property name="expand">True</property>
-                                        <property name="fill">True</property>
-                                        <property name="position">1</property>
+                                        <property name="top_attach">2</property>
+                                        <property name="left_attach">1</property>
                                       </packing>
                                     </child>
-                                  </object>
-                                </child>
-                              </object>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                                <property name="position">2</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkHBox" id="hbox27">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="spacing">12</property>
                                 <child>
                                   <object class="GtkLabel" id="exit-action-combobox-label">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
                                     <property name="label" translatable="yes">When command _exits:</property>
                                     <property name="use_underline">True</property>
-                                    <property name="justify">center</property>
                                     <property name="mnemonic_widget">exit-action-combobox</property>
                                     <property name="xalign">0</property>
                                   </object>
                                   <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">False</property>
-                                    <property name="position">0</property>
+                                    <property name="top_attach">3</property>
+                                    <property name="left_attach">0</property>
                                   </packing>
                                 </child>
                                 <child>
@@ -829,6 +787,7 @@
                                     <property name="can_focus">False</property>
                                     <property name="model">model3</property>
                                     <property name="focus_on_click">False</property>
+                                    <property name="halign">start</property>
                                     <child>
                                       <object class="GtkCellRendererText" id="renderer3"/>
                                       <attributes>
@@ -837,39 +796,10 @@
                                     </child>
                                   </object>
                                   <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">False</property>
-                                    <property name="position">1</property>
+                                    <property name="top_attach">3</property>
+                                    <property name="left_attach">1</property>
                                   </packing>
                                 </child>
-                              </object>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                                <property name="position">3</property>
-                              </packing>
-                            </child>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">True</property>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                      </object>
-                      <packing>
-                        <property name="expand">True</property>
-                        <property name="fill">True</property>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
               </object>
               <packing>
                 <property name="position">1</property>
