diff --git a/src/orca/orca.py b/src/orca/orca.py
index e69c357..cb9eb1a 100644
--- a/src/orca/orca.py
+++ b/src/orca/orca.py
@@ -931,6 +935,8 @@ def _processBrailleEvent(event):
 #                                                                      #
 ########################################################################
 
+_clearedLock = False
+
 def toggleSilenceSpeech(script=None, inputEvent=None):
     """Toggle the silencing of speech.
 
@@ -959,6 +965,7 @@ def loadUserSettings(script=None, inputEvent=None):
     """
 
     global _userSettings
+    global _clearedLock
 
     # Shutdown the output drivers and give them a chance to die.
 
@@ -1067,13 +1074,23 @@ def loadUserSettings(script=None, inputEvent=None):
     # For now, we'll just look at the Orca modifier keys we support
     # (Caps Lock, KP_Insert, and Insert).]]]
     #
+    clearedLock = False
     for keyName in settings.orcaModifierKeys:
         if keyName == "Caps_Lock":
             os.system('xmodmap -e "clear Lock"')
+            _clearedLock = clearedLock = True
         if keyName in ["Caps_Lock", "KP_Insert", "Insert"]:
             command = 'xmodmap -e "keysym %s = %s"' % (keyName, keyName)
             os.system(command)
 
+    # Caps lock was previously in orcamod keys,
+    # we have reloaded and it isnt any longer there.
+    # so re-enable it as a locking key.
+    #
+    if _clearedLock and not clearedLock:
+        os.system('xmodmap -e "add Lock = Caps_Lock"')
+        _clearedLock = False
+
     if _currentPresentationManager >= 0:
         _PRESENTATION_MANAGERS[_currentPresentationManager].activate()
 
@@ -1365,6 +1382,12 @@ def shutdown(script=None, inputEvent=None):
         signal.alarm(0)
 
     _initialized = False
+    # if we used caps lock as a orca modifier, then
+    # re-enable it as a locking key.
+    #
+    if _clearedLock:
+        os.system('xmodmap -e "add Lock = Caps_Lock"')
+
     return True
 
 exitCount = 0
