         if (!g)
             return;     
 
-        var n:int = g.numLayoutItems - 1;
+        var n:int = g.numLayoutElements - 1;
         if (n < 0) 
         {
             setIndexInView(-1, -1);

        if (!scrollR)
            return 0;
            
        var itemR:Rectangle = null;
        switch(unit)
        {
            case ScrollUnit.UP:
            case ScrollUnit.PAGE_UP:
                itemR = findLayoutItemBounds(g, firstIndexInView, -1, scrollR);
                break;

            case ScrollUnit.DOWN:
            case ScrollUnit.PAGE_DOWN:
                itemR = findLayoutItemBounds(g, lastIndexInView, +1, scrollR);
                break;

            default:
                return super.getVerticalScrollPositionDelta(unit);
        }
        
        if (!itemR)
            return 0;
            
        var delta:Number = 0;            
        switch (unit)
        {
            case ScrollUnit.UP:
                delta = Math.max(-scrollR.height, itemR.top - scrollR.top);
                break;
                
            case ScrollUnit.DOWN:
                delta = Math.min(scrollR.height, itemR.bottom - scrollR.bottom);
                break;
                
            case ScrollUnit.PAGE_UP:
                if ((itemR.top < scrollR.top) && (itemR.bottom >= scrollR.bottom))
                    delta = Math.max(-scrollR.height, itemR.top - scrollR.top);
                else
                    delta = itemR.bottom - scrollR.bottom;
                break;

            case ScrollUnit.PAGE_DOWN:
                if ((itemR.top <= scrollR.top) && (itemR.bottom > scrollR.bottom))
                    delta = Math.min(scrollR.height, itemR.bottom - scrollR.bottom);
                else
                    delta = itemR.top - scrollR.top;
                break;
        }


        if (isNaN(columnWidth)) 
        {
			minColumnWidth = columnWidth = 0;
	        var count:uint = layoutTarget.numLayoutElements;
	        for (var i:int = 0; i < count; i++)
	        {
	            var layoutElement:ILayoutElement = layoutTarget.getLayoutElementAt(i);
	            if (!layoutElement || !layoutElement.includeInLayout) 
	               continue;
	            columnWidth = Math.max(columnWidth, layoutElement.getPreferredWidth());
	            var elementMinWidth:Number = hasPercentWidth(layoutElement) ? layoutElement.getMinWidth() : layoutElement.getPreferredWidth();
	            minColumnWidth = Math.max(minColumnWidth, elementMinWidth);
	        }
        }     
        
