diff --git a/java/src/com/android/inputmethod/keyboard/PointerTracker.java b/java/src/com/android/inputmethod/keyboard/PointerTracker.java
index e762b23..2417d6e 100644
--- a/java/src/com/android/inputmethod/keyboard/PointerTracker.java
+++ b/java/src/com/android/inputmethod/keyboard/PointerTracker.java
@@ -545,12 +545,15 @@
     }
 
     private void startBatchInput() {
-        if (DEBUG_LISTENER) {
-            Log.d(TAG, "onStartBatchInput");
+        if (!sInGesture && mGestureStrokeWithPreviewTrail.isStartOfAGesture()) {
+            if (DEBUG_LISTENER) {
+                Log.d(TAG, "onStartBatchInput");
+            }
+            sInGesture = true;
+            mListener.onStartBatchInput();
         }
-        sInGesture = true;
-        mListener.onStartBatchInput();
-        mDrawingProxy.showGesturePreviewTrail(this, true /* isOldestTracker */);
+        final boolean isOldestTracker = sPointerTrackerQueue.getOldestElement() == this;
+        mDrawingProxy.showGesturePreviewTrail(this, isOldestTracker);
     }
 
     private void updateBatchInput(final long eventTime) {
@@ -585,7 +588,8 @@
                 clearBatchInputPointsOfAllPointerTrackers();
             }
         }
-        mDrawingProxy.showGesturePreviewTrail(this,  true /* isOldestTracker */);
+        final boolean isOldestTracker = sPointerTrackerQueue.getOldestElement() == this;
+        mDrawingProxy.showGesturePreviewTrail(this, isOldestTracker);
     }
 
     private static void abortBatchInput() {
@@ -721,12 +725,8 @@
             final boolean isHistorical, final Key key) {
         final int gestureTime = (int)(eventTime - sGestureFirstDownTime);
         if (mIsDetectingGesture) {
-            final GestureStroke stroke = mGestureStrokeWithPreviewTrail;
-            stroke.addPoint(x, y, gestureTime, isHistorical);
-            if (!sInGesture && stroke.isStartOfAGesture()) {
-                startBatchInput();
-            }
-
+            mGestureStrokeWithPreviewTrail.addPoint(x, y, gestureTime, isHistorical);
+            startBatchInput();
             if (sInGesture && key != null) {
                 updateBatchInput(eventTime);
             }
