diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 6cc2206..4b33867 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -161,7 +161,7 @@
             mPositionalInfoForUserDictPendingAddition = null;
     private final WordComposer mWordComposer = new WordComposer();
     private final RichInputConnection mConnection = new RichInputConnection(this);
-    private RecapitalizeStatus mRecapitalizeStatus = null;
+    private final RecapitalizeStatus mRecapitalizeStatus = new RecapitalizeStatus();
 
     // Keep track of the last selection range to decide if we need to show word alternatives
     private static final int NOT_A_CURSOR_POSITION = -1;
@@ -742,6 +742,7 @@
         resetComposingState(true /* alsoResetLastComposedWord */);
         mDeleteCount = 0;
         mSpaceState = SPACE_STATE_NONE;
+        mRecapitalizeStatus.deactivate();
         mCurrentlyPressedHardwareKeys.clear();
 
         if (mSuggestionStripView != null) {
@@ -925,7 +926,7 @@
             // We moved the cursor. If we are touching a word, we need to resume suggestion.
             mHandler.postResumeSuggestions();
             // Reset the last recapitalization.
-            mRecapitalizeStatus = null;
+            mRecapitalizeStatus.deactivate();
             mKeyboardSwitcher.updateShiftState();
         }
         mExpectingUpdateSelection = false;
@@ -1953,10 +1954,9 @@
     private void handleRecapitalize() {
         if (mLastSelectionStart == mLastSelectionEnd) return; // No selection
         // If we have a recapitalize in progress, use it; otherwise, create a new one.
-        if (null == mRecapitalizeStatus
+        if (!mRecapitalizeStatus.isActive()
                 || !mRecapitalizeStatus.isSetAt(mLastSelectionStart, mLastSelectionEnd)) {
-            mRecapitalizeStatus =
-                    new RecapitalizeStatus(mLastSelectionStart, mLastSelectionEnd,
+            mRecapitalizeStatus.initialize(mLastSelectionStart, mLastSelectionEnd,
                     mConnection.getSelectedText(0 /* flags, 0 for no styles */).toString(),
                     mSettings.getCurrentLocale(), mSettings.getWordSeparators());
             // We trim leading and trailing whitespace.
diff --git a/java/src/com/android/inputmethod/latin/RecapitalizeStatus.java b/java/src/com/android/inputmethod/latin/RecapitalizeStatus.java
index 9edd3a1..a121dd9 100644
--- a/java/src/com/android/inputmethod/latin/RecapitalizeStatus.java
+++ b/java/src/com/android/inputmethod/latin/RecapitalizeStatus.java
@@ -37,6 +37,7 @@
         CAPS_MODE_FIRST_WORD_UPPER,
         CAPS_MODE_ALL_UPPER
     };
+
     private static final int getStringMode(final String string, final String separators) {
         if (StringUtils.isIdenticalAfterUpcase(string)) {
             return CAPS_MODE_ALL_UPPER;
@@ -50,24 +51,29 @@
     }
 
     /**
-     * We store the location of the cursor and the string that was there before the undoable
+     * We store the location of the cursor and the string that was there before the recapitalize
      * action was done, and the location of the cursor and the string that was there after.
      */
     private int mCursorStartBefore;
-    private int mCursorEndBefore;
     private String mStringBefore;
     private int mCursorStartAfter;
     private int mCursorEndAfter;
     private int mRotationStyleCurrentIndex;
-    private final boolean mSkipOriginalMixedCaseMode;
-    private final Locale mLocale;
-    private final String mSeparators;
+    private boolean mSkipOriginalMixedCaseMode;
+    private Locale mLocale;
+    private String mSeparators;
     private String mStringAfter;
+    private boolean mIsActive;
 
-    public RecapitalizeStatus(final int cursorStart, final int cursorEnd, final String string,
+    public RecapitalizeStatus() {
+        // By default, initialize with dummy values that won't match any real recapitalize.
+        initialize(-1, -1, "", Locale.getDefault(), "");
+        deactivate();
+    }
+
+    public void initialize(final int cursorStart, final int cursorEnd, final String string,
             final Locale locale, final String separators) {
         mCursorStartBefore = cursorStart;
-        mCursorEndBefore = cursorEnd;
         mStringBefore = string;
         mCursorStartAfter = cursorStart;
         mCursorEndAfter = cursorEnd;
@@ -89,6 +95,15 @@
             mRotationStyleCurrentIndex = currentMode;
             mSkipOriginalMixedCaseMode = true;
         }
+        mIsActive = true;
+    }
+
+    public void deactivate() {
+        mIsActive = false;
+    }
+
+    public boolean isActive() {
+        return mIsActive;
     }
 
     public boolean isSetAt(final int cursorStart, final int cursorEnd) {
@@ -110,23 +125,23 @@
             }
             ++count;
             switch (ROTATION_STYLE[mRotationStyleCurrentIndex]) {
-                case CAPS_MODE_ORIGINAL_MIXED_CASE:
-                    mStringAfter = mStringBefore;
-                    break;
-                case CAPS_MODE_ALL_LOWER:
-                    mStringAfter = mStringBefore.toLowerCase(mLocale);
-                    break;
-                case CAPS_MODE_FIRST_WORD_UPPER:
-                    mStringAfter = StringUtils.capitalizeEachWord(mStringBefore, mSeparators,
-                            mLocale);
-                    break;
-                case CAPS_MODE_ALL_UPPER:
-                    mStringAfter = mStringBefore.toUpperCase(mLocale);
-                    break;
-                default:
-                    mStringAfter = mStringBefore;
+            case CAPS_MODE_ORIGINAL_MIXED_CASE:
+                mStringAfter = mStringBefore;
+                break;
+            case CAPS_MODE_ALL_LOWER:
+                mStringAfter = mStringBefore.toLowerCase(mLocale);
+                break;
+            case CAPS_MODE_FIRST_WORD_UPPER:
+                mStringAfter = StringUtils.capitalizeEachWord(mStringBefore, mSeparators,
+                        mLocale);
+                break;
+            case CAPS_MODE_ALL_UPPER:
+                mStringAfter = mStringBefore.toUpperCase(mLocale);
+                break;
+            default:
+                mStringAfter = mStringBefore;
             }
-        } while (mStringAfter.equals(oldResult) && count < 5);
+        } while (mStringAfter.equals(oldResult) && count < ROTATION_STYLE.length + 1);
         mCursorEndAfter = mCursorStartAfter + mStringAfter.length();
     }
 
@@ -148,7 +163,7 @@
             if (!Character.isWhitespace(codePoint)) break;
         }
         if (0 != nonWhitespaceStart || len != nonWhitespaceEnd) {
-            mCursorEndBefore = mCursorEndAfter = mCursorStartBefore + nonWhitespaceEnd;
+            mCursorEndAfter = mCursorStartBefore + nonWhitespaceEnd;
             mCursorStartBefore = mCursorStartAfter = mCursorStartBefore + nonWhitespaceStart;
             mStringAfter = mStringBefore =
                     mStringBefore.substring(nonWhitespaceStart, nonWhitespaceEnd);
diff --git a/tests/src/com/android/inputmethod/latin/RecapitalizeStatusTests.java b/tests/src/com/android/inputmethod/latin/RecapitalizeStatusTests.java
index 4dfae4c..9d7203e 100644
--- a/tests/src/com/android/inputmethod/latin/RecapitalizeStatusTests.java
+++ b/tests/src/com/android/inputmethod/latin/RecapitalizeStatusTests.java
@@ -24,29 +24,26 @@
 @SmallTest
 public class RecapitalizeStatusTests extends AndroidTestCase {
     public void testTrim() {
-        RecapitalizeStatus status = new RecapitalizeStatus(30, 40, "abcdefghij",
-                Locale.ENGLISH, " ");
+        final RecapitalizeStatus status = new RecapitalizeStatus();
+        status.initialize(30, 40, "abcdefghij", Locale.ENGLISH, " ");
         status.trim();
         assertEquals("abcdefghij", status.getRecapitalizedString());
         assertEquals(30, status.getNewCursorStart());
         assertEquals(40, status.getNewCursorEnd());
 
-        status = new RecapitalizeStatus(30, 44, "    abcdefghij",
-                Locale.ENGLISH, " ");
+        status.initialize(30, 44, "    abcdefghij", Locale.ENGLISH, " ");
         status.trim();
         assertEquals("abcdefghij", status.getRecapitalizedString());
         assertEquals(34, status.getNewCursorStart());
         assertEquals(44, status.getNewCursorEnd());
 
-        status = new RecapitalizeStatus(30, 40, "abcdefgh  ",
-                Locale.ENGLISH, " ");
+        status.initialize(30, 40, "abcdefgh  ", Locale.ENGLISH, " ");
         status.trim();
         assertEquals("abcdefgh", status.getRecapitalizedString());
         assertEquals(30, status.getNewCursorStart());
         assertEquals(38, status.getNewCursorEnd());
 
-        status = new RecapitalizeStatus(30, 45, "   abcdefghij  ",
-                Locale.ENGLISH, " ");
+        status.initialize(30, 45, "   abcdefghij  ", Locale.ENGLISH, " ");
         status.trim();
         assertEquals("abcdefghij", status.getRecapitalizedString());
         assertEquals(33, status.getNewCursorStart());
@@ -54,8 +51,8 @@
     }
 
     public void testRotate() {
-        RecapitalizeStatus status = new RecapitalizeStatus(29, 40, "abcd efghij",
-                Locale.ENGLISH, " ");
+        final RecapitalizeStatus status = new RecapitalizeStatus();
+        status.initialize(29, 40, "abcd efghij", Locale.ENGLISH, " ");
         status.rotate();
         assertEquals("Abcd Efghij", status.getRecapitalizedString());
         assertEquals(29, status.getNewCursorStart());
@@ -67,8 +64,7 @@
         status.rotate();
         assertEquals("Abcd Efghij", status.getRecapitalizedString());
 
-        status = new RecapitalizeStatus(29, 40, "Abcd Efghij",
-                Locale.ENGLISH, " ");
+        status.initialize(29, 40, "Abcd Efghij", Locale.ENGLISH, " ");
         status.rotate();
         assertEquals("ABCD EFGHIJ", status.getRecapitalizedString());
         assertEquals(29, status.getNewCursorStart());
@@ -80,8 +76,7 @@
         status.rotate();
         assertEquals("ABCD EFGHIJ", status.getRecapitalizedString());
 
-        status = new RecapitalizeStatus(29, 40, "ABCD EFGHIJ",
-                Locale.ENGLISH, " ");
+        status.initialize(29, 40, "ABCD EFGHIJ", Locale.ENGLISH, " ");
         status.rotate();
         assertEquals("abcd efghij", status.getRecapitalizedString());
         assertEquals(29, status.getNewCursorStart());
@@ -93,8 +88,7 @@
         status.rotate();
         assertEquals("abcd efghij", status.getRecapitalizedString());
 
-        status = new RecapitalizeStatus(29, 39, "AbCDefghij",
-                Locale.ENGLISH, " ");
+        status.initialize(29, 39, "AbCDefghij", Locale.ENGLISH, " ");
         status.rotate();
         assertEquals("abcdefghij", status.getRecapitalizedString());
         assertEquals(29, status.getNewCursorStart());
@@ -108,8 +102,7 @@
         status.rotate();
         assertEquals("abcdefghij", status.getRecapitalizedString());
 
-        status = new RecapitalizeStatus(29, 40, "Abcd efghij",
-                Locale.ENGLISH, " ");
+        status.initialize(29, 40, "Abcd efghij", Locale.ENGLISH, " ");
         status.rotate();
         assertEquals("abcd efghij", status.getRecapitalizedString());
         assertEquals(29, status.getNewCursorStart());
@@ -123,8 +116,7 @@
         status.rotate();
         assertEquals("abcd efghij", status.getRecapitalizedString());
 
-        status = new RecapitalizeStatus(30, 34, "grüß", Locale.GERMAN, " ");
-        status.rotate();
+        status.initialize(30, 34, "grüß", Locale.GERMAN, " "); status.rotate();
         assertEquals("Grüß", status.getRecapitalizedString());
         assertEquals(30, status.getNewCursorStart());
         assertEquals(34, status.getNewCursorEnd());
@@ -141,9 +133,7 @@
         assertEquals(30, status.getNewCursorStart());
         assertEquals(34, status.getNewCursorEnd());
 
-
-        status = new RecapitalizeStatus(30, 33, "œuf", Locale.FRENCH, " ");
-        status.rotate();
+        status.initialize(30, 33, "œuf", Locale.FRENCH, " "); status.rotate();
         assertEquals("Œuf", status.getRecapitalizedString());
         assertEquals(30, status.getNewCursorStart());
         assertEquals(33, status.getNewCursorEnd());
@@ -160,8 +150,7 @@
         assertEquals(30, status.getNewCursorStart());
         assertEquals(33, status.getNewCursorEnd());
 
-        status = new RecapitalizeStatus(30, 33, "œUf", Locale.FRENCH, " ");
-        status.rotate();
+        status.initialize(30, 33, "œUf", Locale.FRENCH, " "); status.rotate();
         assertEquals("œuf", status.getRecapitalizedString());
         assertEquals(30, status.getNewCursorStart());
         assertEquals(33, status.getNewCursorEnd());
@@ -182,8 +171,7 @@
         assertEquals(30, status.getNewCursorStart());
         assertEquals(33, status.getNewCursorEnd());
 
-        status = new RecapitalizeStatus(30, 35, "école", Locale.FRENCH, " ");
-        status.rotate();
+        status.initialize(30, 35, "école", Locale.FRENCH, " "); status.rotate();
         assertEquals("École", status.getRecapitalizedString());
         assertEquals(30, status.getNewCursorStart());
         assertEquals(35, status.getNewCursorEnd());
