diff --git a/include/class.config.php b/include/class.config.php
index cb1f15d5c4f96447db712798a2a6a8bcfbd548ec..522c93c5d441683cacc3a8839f29e1db1ba611ae 100644
--- a/include/class.config.php
+++ b/include/class.config.php
@@ -154,7 +154,7 @@ class OsticketConfig extends Config {
     var $defaults = array(
         'allow_pw_reset' =>     true,
         'pw_reset_window' =>    30,
-        'enable_html_thread' => true,
+        'enable_richtext' => true,
         'allow_attachments' =>  true,
         'name_format' =>        'full', # First Last
         'auto_claim_tickets'=>  true,
@@ -361,7 +361,7 @@ class OsticketConfig extends Config {
     }
 
     function isHtmlThreadEnabled() {
-        return $this->get('enable_html_thread');
+        return $this->get('enable_richtext');
     }
 
     function getClientTimeout() {
@@ -1132,7 +1132,7 @@ class OsticketConfig extends Config {
             'show_answered_tickets'=>isset($vars['show_answered_tickets'])?0:1,
             'show_related_tickets'=>isset($vars['show_related_tickets'])?1:0,
             'hide_staff_name'=>isset($vars['hide_staff_name'])?1:0,
-            'enable_html_thread'=>isset($vars['enable_html_thread'])?1:0,
+            'enable_richtext'=>isset($vars['enable_html_thread'])?1:0,
             'allow_client_updates'=>isset($vars['allow_client_updates'])?1:0,
             'max_file_size'=>$vars['max_file_size'],
         ));
diff --git a/include/upgrader/streams/core/9143a511-00000000.cleanup.sql b/include/upgrader/streams/core/9143a511-00000000.cleanup.sql
index 3095f761ba864e6a6c7166cfe5358ed309c3d124..9597462e1f906207b921b12513a18924c0b71983 100644
--- a/include/upgrader/streams/core/9143a511-00000000.cleanup.sql
+++ b/include/upgrader/streams/core/9143a511-00000000.cleanup.sql
@@ -62,6 +62,9 @@ WHERE `key`='transient' AND `namespace` LIKE 'sla.%';
 DELETE FROM `%TABLE_PREFIX%config`
 WHERE `key`='configuration' AND `namespace` LIKE 'list.%';
 
+DELETE FROM `%TABLE_PREFIX%config`
+WHERE `key`='name_format' AND `namespace` = 'core';
+
 -- Orphan users who don't know they're orphans
 UPDATE `%TABLE_PREFIX%user` A1
   LEFT JOIN `%TABLE_PREFIX%organization` A2 ON (A1.`org_id` = A2.`id`)
diff --git a/include/upgrader/streams/core/9143a511-00000000.patch.sql b/include/upgrader/streams/core/9143a511-00000000.patch.sql
index 5bd52c8f51ac782c4a1a5bcac70d8c21c93c3f20..78f0d11eb19da86fc15c5970fe6ab06ed127c404 100644
--- a/include/upgrader/streams/core/9143a511-00000000.patch.sql
+++ b/include/upgrader/streams/core/9143a511-00000000.patch.sql
@@ -91,6 +91,18 @@ UPDATE `%TABLE_PREFIX%list` A1
 -- Rebuild %ticket__cdata as UTF8
 DROP TABLE IF EXISTS `%TABLE_PREFIX%ticket__cdata`;
 
+-- Move `enable_html_thread` to `enable_richtext`
+UPDATE `%TABLE_PREFIX%config`
+  SET `key` = 'enable_richtext'
+  WHERE `namespace` = 'core' AND `key` = 'enable_html_thread';
+
+SET @name_format = (SELECT `value` FROM `%TABLE_PREFIX%config` A1
+    WHERE A1.`namespace` = 'core' AND A1.`key` = 'name_format');
+INSERT INTO `%TABLE_PREFIX%config`
+    (`namespace`, `key`, `value`) VALUES
+    ('core', 'agent_name_format', @name_format),
+    ('core', 'client_name_format', @name_format);
+
 -- Finished with patch
 UPDATE `%TABLE_PREFIX%config`
     SET `value` = '00000000000000000000000000000000'