diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java
index 811470c..21477a9 100644
--- a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java
+++ b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java
@@ -280,7 +280,6 @@
             mSymbolsKeyboardId = getKeyboardId(editorInfo, true, false, settingsValues);
             mSymbolsShiftedKeyboardId = getKeyboardId(editorInfo, true, true, settingsValues);
             setKeyboard(getKeyboard(mSavedKeyboardState.getKeyboardId()));
-            updateShiftState();
         } catch (RuntimeException e) {
             Log.w(TAG, "loading keyboard failed: " + mMainKeyboardId, e);
             LatinImeLogger.logOnException(mMainKeyboardId.toString(), e);
@@ -331,6 +330,7 @@
         final boolean localeChanged = (oldKeyboard == null)
                 || !keyboard.mId.mLocale.equals(oldKeyboard.mId.mLocale);
         mInputMethodService.mHandler.startDisplayLanguageOnSpacebar(localeChanged);
+        updateShiftState();
     }
 
     private int getSwitchState(KeyboardId id) {
@@ -543,11 +543,12 @@
     }
 
     private void setAutomaticTemporaryUpperCase() {
-        LatinKeyboard latinKeyboard = getLatinKeyboard();
-        if (latinKeyboard != null) {
-            latinKeyboard.setAutomaticTemporaryUpperCase();
-            mKeyboardView.invalidateAllKeys();
+        if (mKeyboardView == null) return;
+        final Keyboard keyboard = mKeyboardView.getKeyboard();
+        if (keyboard != null) {
+            keyboard.setAutomaticTemporaryUpperCase();
         }
+        mKeyboardView.invalidateAllKeys();
     }
 
     /**
@@ -559,7 +560,9 @@
             Log.d(TAG, "updateShiftState:"
                     + " autoCaps=" + mInputMethodService.getCurrentAutoCapsState()
                     + " keyboard=" + getLatinKeyboard().getKeyboardShiftState()
-                    + " shiftKeyState=" + shiftKeyState);
+                    + " shiftKeyState=" + shiftKeyState
+                    + " isAlphabetMode=" + isAlphabetMode()
+                    + " isShiftLocked=" + isShiftLocked());
         if (isAlphabetMode()) {
             if (!isShiftLocked() && !shiftKeyState.isIgnoring()) {
                 if (shiftKeyState.isReleasing() && mInputMethodService.getCurrentAutoCapsState()) {
diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyboardShiftState.java b/java/src/com/android/inputmethod/keyboard/internal/KeyboardShiftState.java
index 0cde4e5..fd98456 100644
--- a/java/src/com/android/inputmethod/keyboard/internal/KeyboardShiftState.java
+++ b/java/src/com/android/inputmethod/keyboard/internal/KeyboardShiftState.java
@@ -21,7 +21,7 @@
 import com.android.inputmethod.keyboard.KeyboardSwitcher;
 
 public class KeyboardShiftState {
-    private static final String TAG = "KeyboardShiftState";
+    private static final String TAG = KeyboardShiftState.class.getSimpleName();
     private static final boolean DEBUG = KeyboardSwitcher.DEBUG_STATE;
 
     private static final int NORMAL = 0;
