diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 68ed238..b84bba2 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -1272,7 +1272,7 @@
 
     @Override
     public void onCancelBatchInput() {
-        mInputLogic.onCancelBatchInput(mInputUpdater);
+        mInputLogic.onCancelBatchInput(mHandler, mInputUpdater);
     }
 
     // TODO[IL]: Make this a package-private standalone class in inputlogic/ and remove all
@@ -1310,17 +1310,15 @@
             return true;
         }
 
-        // Run in the UI thread.
+        // Run on the UI thread.
         public void onStartBatchInput() {
             synchronized (mLock) {
                 mHandler.removeMessages(MSG_UPDATE_GESTURE_PREVIEW_AND_SUGGESTION_STRIP);
                 mInBatchInput = true;
-                mLatinIme.mHandler.showGesturePreviewAndSuggestionStrip(
-                        SuggestedWords.EMPTY, false /* dismissGestureFloatingPreviewText */);
             }
         }
 
-        // Run in the Handler thread.
+        // Run on the Handler thread.
         private void updateBatchInput(final InputPointers batchPointers, final int sequenceNumber) {
             synchronized (mLock) {
                 if (!mInBatchInput) {
@@ -1339,7 +1337,7 @@
             }
         }
 
-        // Run in the UI thread.
+        // Run on the UI thread.
         public void onUpdateBatchInput(final InputPointers batchPointers,
                 final int sequenceNumber) {
             if (mHandler.hasMessages(MSG_UPDATE_GESTURE_PREVIEW_AND_SUGGESTION_STRIP)) {
@@ -1352,12 +1350,10 @@
         public void onCancelBatchInput() {
             synchronized (mLock) {
                 mInBatchInput = false;
-                mLatinIme.mHandler.showGesturePreviewAndSuggestionStrip(
-                        SuggestedWords.EMPTY, true /* dismissGestureFloatingPreviewText */);
             }
         }
 
-        // Run in the UI thread.
+        // Run on the UI thread.
         public void onEndBatchInput(final InputPointers batchPointers) {
             synchronized(mLock) {
                 getSuggestedWordsGestureLocked(batchPointers, SuggestedWords.NOT_A_SEQUENCE_NUMBER,
@@ -1407,7 +1403,7 @@
         }
     }
 
-    // This method must run in UI Thread.
+    // This method must run on the UI Thread.
     private void showGesturePreviewAndSuggestionStrip(final SuggestedWords suggestedWords,
             final boolean dismissGestureFloatingPreviewText) {
         showSuggestionStrip(suggestedWords);
@@ -1418,7 +1414,7 @@
         }
     }
 
-    // This method must run in UI Thread.
+    // This method must run on the UI Thread.
     public void onEndBatchInputAsyncInternal(final SuggestedWords suggestedWords) {
         final String batchInputText = suggestedWords.isEmpty() ? null : suggestedWords.getWord(0);
         if (TextUtils.isEmpty(batchInputText)) {
diff --git a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
index 61d4bab..4a4abd7 100644
--- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
+++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
@@ -303,6 +303,8 @@
             final KeyboardSwitcher keyboardSwitcher, final LatinIME.UIHandler handler,
             final LatinIME.InputUpdater inputUpdater) {
         inputUpdater.onStartBatchInput();
+        handler.showGesturePreviewAndSuggestionStrip(
+                SuggestedWords.EMPTY, false /* dismissGestureFloatingPreviewText */);
         handler.cancelUpdateSuggestionStrip();
         mConnection.beginBatchEdit();
         if (mWordComposer.isComposingWord()) {
@@ -403,9 +405,12 @@
         inputUpdater.onEndBatchInput(batchPointers);
     }
 
-    // TODO: remove this argument
-    public void onCancelBatchInput(final LatinIME.InputUpdater inputUpdater) {
+    // TODO: remove these arguments
+    public void onCancelBatchInput(final LatinIME.UIHandler handler,
+            final LatinIME.InputUpdater inputUpdater) {
         inputUpdater.onCancelBatchInput();
+        handler.showGesturePreviewAndSuggestionStrip(
+                SuggestedWords.EMPTY, true /* dismissGestureFloatingPreviewText */);
     }
 
     /**
