         {
             // We are already taking scale into account from the transform,
             // so adjust here since IUIComponent mixes it with width/height
-            height /= obj.scaleY;
+            height = (obj.scaleY == 0) ? 0 : height / obj.scaleY;
         }
 
         if (transformMatrix)

        {
            // We are already taking scale into account from the transform,
            // so adjust here since IUIComponent mixes it with width/height
            minWidth /= obj.scaleX;
        }
        return minWidth;
    }

    {
        if (transformMatrix)
        {
            //race("Setting actual position to " + x + "," + y);
            //race("\tcurrent x/y is " + obj.x + "," + obj.y); 
            //race("\tcurrent actual position is " + actualPosition.x + "," + actualPosition.y);
            x = x - getLayoutBoundsX(obj,transformMatrix) + obj.x;
            y = y - getLayoutBoundsY(obj,transformMatrix) + obj.y;
        }
