diff --git a/src/com/android/launcher3/BubbleTextView.java b/src/com/android/launcher3/BubbleTextView.java
index 7a7a3b6..54f8846 100644
--- a/src/com/android/launcher3/BubbleTextView.java
+++ b/src/com/android/launcher3/BubbleTextView.java
@@ -20,6 +20,7 @@
 import android.content.res.Resources;
 import android.graphics.Bitmap;
 import android.graphics.Canvas;
+import android.graphics.Color;
 import android.graphics.Rect;
 import android.graphics.Region;
 import android.graphics.Region.Op;
@@ -55,6 +56,8 @@
     private int mPressedOutlineColor;
     private int mPressedGlowColor;
 
+    private int mTextColor;
+    private boolean mShadowsEnabled = true;
     private boolean mIsTextVisible;
 
     private boolean mBackgroundSizeChanged;
@@ -85,6 +88,7 @@
         LauncherAppState app = LauncherAppState.getInstance();
         DeviceProfile grid = app.getDynamicGrid().getDeviceProfile();
         setTextSize(TypedValue.COMPLEX_UNIT_SP, grid.iconTextSize);
+        setTextColor(getResources().getColor(R.color.workspace_icon_text_color));
     }
 
     private void init() {
@@ -290,6 +294,11 @@
 
     @Override
     public void draw(Canvas canvas) {
+        if (!mShadowsEnabled) {
+            super.draw(canvas);
+            return;
+        }
+
         final Drawable background = mBackground;
         if (background != null) {
             final int scrollX = getScrollX();
@@ -340,12 +349,24 @@
         if (mBackground != null) mBackground.setCallback(null);
     }
 
+    @Override
+    public void setTextColor(int color) {
+        mTextColor = color;
+        super.setTextColor(color);
+    }
+
+    public void setShadowsEnabled(boolean enabled) {
+        mShadowsEnabled = enabled;
+        getPaint().clearShadowLayer();
+        invalidate();
+    }
+
     public void setTextVisibility(boolean visible) {
         Resources res = getResources();
         if (visible) {
-            setTextColor(res.getColor(R.color.workspace_icon_text_color));
+            super.setTextColor(mTextColor);
         } else {
-            setTextColor(res.getColor(android.R.color.transparent));
+            super.setTextColor(res.getColor(android.R.color.transparent));
         }
         mIsTextVisible = visible;
     }
diff --git a/src/com/android/launcher3/Folder.java b/src/com/android/launcher3/Folder.java
index 808d85d..47fc6c3 100644
--- a/src/com/android/launcher3/Folder.java
+++ b/src/com/android/launcher3/Folder.java
@@ -143,7 +143,8 @@
 
         Resources res = getResources();
         mMaxCountX = (int) grid.numColumns;
-        mMaxCountY = mMaxNumItems = Integer.MAX_VALUE;
+        mMaxCountY = (int) grid.numRows;
+        mMaxNumItems = mMaxCountX * mMaxCountY;
 
         mInputMethodManager = (InputMethodManager)
                 getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
@@ -526,12 +527,14 @@
     }
 
     protected boolean createAndAddShortcut(ShortcutInfo item) {
-        final TextView textView =
-            (TextView) mInflater.inflate(R.layout.application, this, false);
+        final BubbleTextView textView =
+            (BubbleTextView) mInflater.inflate(R.layout.application, this, false);
         textView.setCompoundDrawablesWithIntrinsicBounds(null,
                 new FastBitmapDrawable(item.getIcon(mIconCache)), null, null);
         textView.setText(item.title);
         textView.setTag(item);
+        textView.setTextColor(getResources().getColor(R.color.folder_items_text_color));
+        textView.setShadowsEnabled(false);
 
         textView.setOnClickListener(this);
         textView.setOnLongClickListener(this);
