         if (showHSB)
         {
             hsb.setLayoutBoundsSize(Math.max(hsb.getMinBoundsWidth(), viewportW), hsbH);
-            hsb.setLayoutBoundsPosition(0, h - hsbH);
+            hsb.setLayoutBoundsPosition(minViewportInset, h - Math.max(minViewportInset, hsbH));
         }
         if (vsb) vsb.visible = showVSB;
         if (showVSB)
         {
             vsb.setLayoutBoundsSize(vsbW, Math.max(vsb.getMinBoundsHeight(), viewportH));
-            vsb.setLayoutBoundsPosition(w - vsbW, 0);
+            vsb.setLayoutBoundsPosition(w - Math.max(minViewportInset, vsbW), minViewportInset);
         }
         
         target.setContentSize(w, h);

            case ScrollPolicy.AUTO: 
                if (hsb && viewport)
                {
                    showHSB = viewport.contentWidth > w;
                    hAuto = true;
                } 
                break;

            case ScrollPolicy.AUTO: 
                if (vsb && viewport)
                { 
                    showVSB = viewport.contentHeight > (h - (minViewportInset * 2));
                    vAuto = true;
                }                        
                break;
        }
        
        // Shrink the viewport's width,height for the visible scrollbars
        var viewportH:Number = h - minViewportInset;
        var hsbH:Number = 0;
        if (showHSB) 
        {
            hsbH = hsb.getPreferredBoundsHeight();
            viewportH -= Math.max(minViewportInset, hsbH);
        }
        var viewportW:Number = w - minViewportInset;
        var vsbW:Number = 0;
        if (showVSB) 
        {
            vsbW = vsb.getPreferredBoundsWidth();
            viewportW -= Math.max(minViewportInset, vsbW);
        }
        
        // If the scrollBarPolicy is auto, and we're only showing one scrollbar, 
        // the viewport may have shrunk enough to require showing the other one.
        if (showVSB && !showHSB && hAuto && (viewport.contentWidth > viewportW))
        {
            showHSB = true;
            hsbH = hsb.getPreferredBoundsHeight();                
            viewportH -= Math.max(minViewportInset, hsbH);
        }
        else if (!showVSB && showHSB && vAuto && (viewport.contentHeight > viewportH))
        {
            showVSB = true;
            vsbW = vsb.getPreferredBoundsWidth();                
            viewportW -= Math.max(minViewportInset, vsbW);
        }
        
        // Factor in scrollBar-side viewportInsets where there aren't scrollbars
        if (!showHSB)
            viewportH -= minViewportInset;
        if (!showVSB)
            viewportW -= minViewportInset;

        // layout the viewport
        if (viewport)
        {
            var viewportElt:ILayoutElement = ILayoutElement(viewport);
            viewportElt.setLayoutBoundsSize(viewportW, viewportH);
            viewportElt.setLayoutBoundsPosition(minViewportInset, minViewportInset);
        }
        
        // layout the scrollbars
