diff --git a/quickstep/src/com/android/launcher3/uioverrides/PortraitStatesTouchController.java b/quickstep/src/com/android/launcher3/uioverrides/PortraitStatesTouchController.java
index 54ecb28..987f952 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/PortraitStatesTouchController.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/PortraitStatesTouchController.java
@@ -189,14 +189,8 @@
             if (isFling && expectedDuration != 0) {
                 // Update all apps interpolator to add a bit of overshoot starting from currFraction
                 final float currFraction = mCurrentAnimation.getProgressFraction();
-                mAllAppsInterpolatorWrapper.baseInterpolator
-                        = new OvershootInterpolator(Math.min(Math.abs(velocity) / 3, 3f)) {
-                    @Override
-                    public float getInterpolation(float t) {
-                        return super.getInterpolation(t) + ((1 - t) * currFraction);
-                    }
-                };
-                animator.setFloatValues(0, 1);
+                mAllAppsInterpolatorWrapper.baseInterpolator = Interpolators.clampToProgress(
+                        new OvershootInterpolator(Math.min(Math.abs(velocity), 3f)), currFraction, 1);
                 animator.setDuration(Math.min(expectedDuration, ATOMIC_DURATION))
                         .setInterpolator(LINEAR);
             }
diff --git a/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java b/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java
index 8ffa628..0e68538 100644
--- a/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java
+++ b/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java
@@ -210,11 +210,13 @@
                 @Override
                 public void onAnimationSuccess(Animator animation) {
                     cancelAtomicComponentsController();
-                    mAtomicComponentsStartProgress = mCurrentAnimation.getProgressFraction();
-                    long duration = (long) (getShiftRange() * 2);
-                    mAtomicComponentsController = AnimatorPlaybackController.wrap(
-                            createAtomicAnimForState(mFromState, mToState, duration), duration);
-                    mAtomicComponentsController.dispatchOnStart();
+                    if (mCurrentAnimation != null) {
+                        mAtomicComponentsStartProgress = mCurrentAnimation.getProgressFraction();
+                        long duration = (long) (getShiftRange() * 2);
+                        mAtomicComponentsController = AnimatorPlaybackController.wrap(
+                                createAtomicAnimForState(mFromState, mToState, duration), duration);
+                        mAtomicComponentsController.dispatchOnStart();
+                    }
                 }
             });
         }
