                 else
                     layoutElementWidth = layoutElement.getPreferredBoundsWidth();
                 
-                containerWidth = Math.max(containerWidth, layoutElementWidth);
+                containerWidth = Math.max(containerWidth, Math.ceil(layoutElementWidth));
             }
         }
 

            if ((reqEltCount == -1) || ((reqEltCount != -1) && eltInLayoutCount < requestedRowCount))
            {
                var height:Number = isNaN(fixedRowHeight) ? elt.getPreferredBoundsHeight() : fixedRowHeight;
                preferredHeight += height;
                minHeight += (isNaN(elt.percentHeight)) ? height : elt.getMinBoundsHeight();
                eltInLayoutCount += 1;
            }
            
            // Consider the width of each element, inclusive of those outside
            // the requestedRowCount range.
            var width:Number = elt.getPreferredBoundsWidth();
            preferredWidth = Math.max(preferredWidth, width);
            var flexibleWidth:Boolean = !isNaN(elt.percentWidth) || horizontalAlign == HorizontalAlign.JUSTIFY;
            minWidth = Math.max(minWidth, flexibleWidth ? elt.getMinBoundsWidth() : width);           
        }
        
        if (eltInLayoutCount > 1)

                continue;
                
            // Set the layout element's position
            var dx:Number = Math.ceil(layoutElement.getLayoutBoundsWidth());
            var dy:Number = Math.ceil(layoutElement.getLayoutBoundsHeight());

            var x:Number = x0 + (containerWidth - dx) * hAlign;
            // In case we have HorizontalAlign.CENTER we have to round
            if (hAlign == 0.5)
                x = Math.round(x);
            layoutElement.setLayoutBoundsPosition(x, y);
                            
            // Update maxX,Y, first,lastVisibleIndex, and y
            maxX = Math.max(maxX, x + dx);
            maxY = Math.max(maxY, y + dy);
            if (!clipAndEnableScrolling ||
