         if (!g)
             return 0;     
 
-        var maxIndex:int = g.numLayoutItems -1;
+        var maxIndex:int = g.numLayoutElements -1;
         if (maxIndex < 0)
             return 0;
 

    /**
     *  LayoutBase::getScrollPositionDelta() computes the
     *  vertical and horizontalScrollPosition deltas needed to 
     *  scroll the item at the specified index into view.
     * 
     *  If clipContent is true and the item at the specified index is not
     *  entirely visible relative to the target's scrollRect, then 
     *  return the delta to be added to horizontalScrollPosition and
     *  verticalScrollPosition that will scroll the item completely 
     *  within the scrollRect's bounds.
     * 
     *  If the specified item is partially visible and larger than the
     *  scrollRect, i.e. it's already the only item visible, then
     *  null is returned.
     * 
     *  This method attempts to minmimze the change to verticalScrollPosition

        if (!g)
            return 0;     

        var maxIndex:int = g.numLayoutElements -1;
        if (maxIndex < 0)
            return 0;

