diff --git a/src/pregmod/managePersonalAffairs.tw b/src/pregmod/managePersonalAffairs.tw
index c9828fce078168326204cdb28f7d9a91b8e8702c..3dd08aadb9e03c481051eaf4df96cfd007986f33 100644
--- a/src/pregmod/managePersonalAffairs.tw
+++ b/src/pregmod/managePersonalAffairs.tw
@@ -365,7 +365,8 @@ On formal occasions, you are announced as $PCTitle. By slaves, however, you pref
 			<<link "Apply">>
 				<<replace "#result">>
 					Your title is now $PC.customTitle.
-					<<set $PC.customTitleLisp = $PC.customTitle, $PC.customTitleLisp = $PC.customTitleLisp.replace("ss", "th"), $PC.customTitleLisp = $PC.customTitleLisp.replace("S", "Th"), $PC.customTitleLisp = $PC.customTitleLisp.replace("s", "th")>>
+					<<set $PC.customTitleLisp = $PC.customTitle>>
+					<<set $PC.customTitleLisp = nameReplace($PC.customTitleLisp)>>
 				<</replace>>
 			<</link>>
 		<</replace>>
@@ -375,7 +376,8 @@ On formal occasions, you are announced as $PCTitle. By slaves, however, you pref
 	<<link "Apply">>
 		<<replace "#result">>
 			Your title is now $PC.customTitle.
-			<<set $PC.customTitleLisp = $PC.customTitle, $PC.customTitleLisp = $PC.customTitleLisp.replace("ss", "th"), $PC.customTitleLisp = $PC.customTitleLisp.replace("S", "Th"), $PC.customTitleLisp = $PC.customTitleLisp.replace("s", "th")>>
+			<<set $PC.customTitleLisp = $PC.customTitle>>
+			<<set $PC.customTitleLisp = nameReplace($PC.customTitleLisp)>>
 		<</replace>>
 	<</link>> |
 	<<link "Stop using a custom title">>