diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 2217dd2..40db03c 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -981,7 +981,7 @@
             // When in fullscreen mode, show completions generated by the application
             final SuggestedWords words = builder.build();
             setSuggestions(words);
-            setAutoCorrectionIndicator(words);
+            setAutoCorrectionIndicator(Utils.willAutoCorrect(words));
             // TODO: is this the right thing to do? What should we auto-correct to in
             // this case? This says to keep whatever the user typed.
             mWordComposer.setAutoCorrection(mWordComposer.getTypedWord());
@@ -1715,7 +1715,7 @@
 
     public void clearSuggestions() {
         setSuggestions(SuggestedWords.EMPTY);
-        setAutoCorrectionIndicator(SuggestedWords.EMPTY);
+        setAutoCorrectionIndicator(Utils.willAutoCorrect(SuggestedWords.EMPTY));
     }
 
     public void setSuggestions(final SuggestedWords words) {
@@ -1726,13 +1726,12 @@
         }
     }
 
-    private void setAutoCorrectionIndicator(final SuggestedWords words) {
+    private void setAutoCorrectionIndicator(final boolean newAutoCorrectionIndicator) {
         // Put a blue underline to a word in TextView which will be auto-corrected.
         final InputConnection ic = getCurrentInputConnection();
         if (ic != null) {
             final boolean oldAutoCorrectionIndicator =
                     mComposingStateManager.isAutoCorrectionIndicatorOn();
-            final boolean newAutoCorrectionIndicator = Utils.willAutoCorrect(words);
             if (oldAutoCorrectionIndicator != newAutoCorrectionIndicator) {
                 mComposingStateManager.setAutoCorrectionIndicatorOn(newAutoCorrectionIndicator);
                 if (DEBUG) {
@@ -1853,7 +1852,7 @@
         }
         mWordComposer.setAutoCorrection(autoCorrection);
         setSuggestions(suggestedWords);
-        setAutoCorrectionIndicator(suggestedWords);
+        setAutoCorrectionIndicator(Utils.willAutoCorrect(suggestedWords));
         setSuggestionStripShown(isSuggestionsStripVisible());
     }
 
@@ -2027,7 +2026,7 @@
 
     public void setPunctuationSuggestions() {
         setSuggestions(mSettingsValues.mSuggestPuncList);
-        setAutoCorrectionIndicator(mSettingsValues.mSuggestPuncList);
+        setAutoCorrectionIndicator(Utils.willAutoCorrect(mSettingsValues.mSuggestPuncList));
         setSuggestionStripShown(isSuggestionsStripVisible());
     }
 
