diff --git a/src/com/android/launcher2/AllAppsPagedView.java b/src/com/android/launcher2/AllAppsPagedView.java
index 4dcdb81..149f9fb 100644
--- a/src/com/android/launcher2/AllAppsPagedView.java
+++ b/src/com/android/launcher2/AllAppsPagedView.java
@@ -18,14 +18,13 @@
 
 import java.util.ArrayList;
 import java.util.Collections;
+import java.util.HashSet;
 
 import android.content.ComponentName;
 import android.content.Context;
 import android.content.res.TypedArray;
-import android.graphics.drawable.Drawable;
 import android.util.AttributeSet;
 import android.view.ActionMode;
-import android.view.Gravity;
 import android.view.LayoutInflater;
 import android.view.Menu;
 import android.view.MenuItem;
@@ -294,7 +293,22 @@
     }
 
     private void removeAppsWithoutInvalidate(ArrayList<ApplicationInfo> list) {
-        // loop through all the apps and remove apps that have the same component
+        // End the choice mode if any of the items in the list that are being removed are
+        // currently selected
+        ArrayList<Checkable> checkedList = getCheckedGrandchildren();
+        HashSet<ApplicationInfo> checkedAppInfos = new HashSet<ApplicationInfo>();
+        for (Checkable checked : checkedList) {
+            PagedViewIcon icon = (PagedViewIcon) checked;
+            checkedAppInfos.add((ApplicationInfo) icon.getTag());
+        }
+        for (ApplicationInfo info : list) {
+            if (checkedAppInfos.contains(info)) {
+                endChoiceMode();
+                break;
+            }
+        }
+
+        // Loop through all the apps and remove apps that have the same component
         final int length = list.size();
         for (int i = 0; i < length; ++i) {
             final ApplicationInfo info = list.get(i);
diff --git a/src/com/android/launcher2/CustomizePagedView.java b/src/com/android/launcher2/CustomizePagedView.java
index 5cfc38f..a475a50 100644
--- a/src/com/android/launcher2/CustomizePagedView.java
+++ b/src/com/android/launcher2/CustomizePagedView.java
@@ -144,7 +144,7 @@
         Collections.sort(mApps, LauncherModel.APP_NAME_COMPARATOR);
 
         // Update the widgets/shortcuts to reflect changes in the set of available apps
-        update();
+        invalidatePageDataAndIconCache();
     }
 
     /**
@@ -170,7 +170,7 @@
         addAppsWithoutInvalidate(list);
 
         // Update the widgets/shortcuts to reflect changes in the set of available apps
-        update();
+        invalidatePageDataAndIconCache();
     }
 
     /**
@@ -197,7 +197,7 @@
         removeAppsWithoutInvalidate(list);
 
         // Update the widgets/shortcuts to reflect changes in the set of available apps
-        update();
+        invalidatePageDataAndIconCache();
     }
 
     /**
@@ -212,7 +212,7 @@
         addAppsWithoutInvalidate(list);
 
         // Update the widgets/shortcuts to reflect changes in the set of available apps
-        update();
+        invalidatePageDataAndIconCache();
     }
 
     /**
@@ -231,8 +231,6 @@
     }
 
     public void update() {
-        Context context = getContext();
-
         // get the list of widgets
         mWidgetList = AppWidgetManager.getInstance(mLauncher).getInstalledProviders();
         Collections.sort(mWidgetList, new Comparator<AppWidgetProviderInfo>() {
@@ -260,7 +258,11 @@
         mWallpaperList = mPackageManager.queryIntentActivities(wallpapersIntent, 0);
         Collections.sort(mWallpaperList, resolveInfoComparator);
 
-        // reset the icon cache
+        invalidatePageDataAndIconCache();
+    }
+
+    private void invalidatePageDataAndIconCache() {
+        // Reset the icon cache
         mPageViewIconCache.clear();
 
         // Refresh all the tabs
diff --git a/src/com/android/launcher2/PagedView.java b/src/com/android/launcher2/PagedView.java
index 9739b15..c125696 100644
--- a/src/com/android/launcher2/PagedView.java
+++ b/src/com/android/launcher2/PagedView.java
@@ -755,7 +755,9 @@
                 // by a distant descendant, so use the mAllowLongPress flag to block
                 // everything
                 final View currentPage = getPageAt(mCurrentPage);
-                currentPage.cancelLongPress();
+                if (currentPage != null) {
+                    currentPage.cancelLongPress();
+                }
             }
         }
     }
