diff --git a/java/src/com/android/inputmethod/compat/SuggestionSpanUtils.java b/java/src/com/android/inputmethod/compat/SuggestionSpanUtils.java
index 5b02de3..5d89669 100644
--- a/java/src/com/android/inputmethod/compat/SuggestionSpanUtils.java
+++ b/java/src/com/android/inputmethod/compat/SuggestionSpanUtils.java
@@ -23,8 +23,10 @@
 import android.text.Spannable;
 import android.text.SpannableString;
 import android.text.Spanned;
+import android.text.TextUtils;
 
 import java.lang.reflect.Constructor;
+import java.util.ArrayList;
 import java.util.Locale;
 
 public class SuggestionSpanUtils {
@@ -33,6 +35,7 @@
     public static final String SUGGESTION_SPAN_PICKED_AFTER = "after";
     public static final String SUGGESTION_SPAN_PICKED_BEFORE = "before";
     public static final String SUGGESTION_SPAN_PICKED_HASHCODE = "hashcode";
+    public static final int SUGGESTION_MAX_SIZE = 5;
 
     private static final Class<?> CLASS_SuggestionSpan = CompatUtils
             .getClass("android.text.style.SuggestionSpan");
@@ -48,8 +51,8 @@
 
     public static CharSequence getTextWithSuggestionSpan(Context context,
             CharSequence suggestion, SuggestedWords suggestedWords) {
-        if (CONSTRUCTOR_SuggestionSpan == null || suggestedWords == null
-                || suggestedWords.size() == 0) {
+        if (TextUtils.isEmpty(suggestion) || CONSTRUCTOR_SuggestionSpan == null
+                || suggestedWords == null || suggestedWords.size() == 0) {
             return suggestion;
         }
 
@@ -59,14 +62,19 @@
         } else {
             spannable = new SpannableString(suggestion);
         }
-        // TODO: Use SUGGESTIONS_MAX_SIZE instead of 5.
-        final int N = Math.min(5, suggestedWords.size());
-        final String[] suggestionsArray = new String[N];
-        for (int i = 0; i < N; ++i) {
-            suggestionsArray[i] = suggestedWords.getWord(i).toString();
+        final ArrayList<String> suggestionsList = new ArrayList<String>();
+        for (int i = 0; i < suggestedWords.size(); ++i) {
+            if (suggestionsList.size() >= SUGGESTION_MAX_SIZE) {
+                break;
+            }
+            final CharSequence word = suggestedWords.getWord(i);
+            if (!TextUtils.equals(suggestion, word)) {
+                suggestionsList.add(word.toString());
+            }
         }
+
         final Object[] args =
-                { context, null, suggestionsArray, 0,
+                { context, null, suggestionsList.toArray(new String[suggestionsList.size()]), 0,
                         (Class<?>) SuggestionSpanPickedNotificationReceiver.class };
         final Object ss = CompatUtils.newInstance(CONSTRUCTOR_SuggestionSpan, args);
         if (ss == null) {
