             }
 
             if (isNaN(top) && isNaN(bottom) &&
-                isNaN(LayoutItemHelper.parseConstraintValue(layoutItem.verticalCenter)))
-            {
-                extY += layoutItem.actualPosition.y;
+                isNaN(LayoutElementHelper.parseConstraintValue(layoutElement.verticalCenter)))
+            {
+                extY += layoutElement.getLayoutPositionY();
             }
             else
             {

            {
                childHeight = unscaledHeight - bottom - top;
            }
            else if (!isNaN(layoutItem.percentHeight))
            {
                childHeight = unscaledHeight * Math.min(layoutItem.percentHeight * 0.01, 1);
                itemMaxSize.y = Math.min(itemMaxSize.y,
                    maxSizeToFitIn(unscaledHeight, vCenter, top, bottom, childY));
            }

            // Apply min and max constraints, make sure min is applied last. In the cases
            // where childWidth and childHeight are NaN, setActualSize will use preferredSize
            // which is already constrained between min and max.
            if (!isNaN(childWidth))
                childWidth = Math.max(itemMinSize.x, Math.min(itemMaxSize.x, childWidth));
            if (!isNaN(childHeight))
                childHeight = Math.max(itemMinSize.y, Math.min(itemMaxSize.y, childHeight));

            // Set the size.
            var actualSize:Point = layoutItem.setActualSize(childWidth, childHeight);

            // Horizontal position
            if (!isNaN(hCenter))
                childX = Math.round((unscaledWidth - actualSize.x) / 2 + hCenter);
            else if (!isNaN(left))
                childX = left;
            else if (!isNaN(right))
                childX = unscaledWidth - actualSize.x - right;
            else // since setting actual size might have moved the actual position, we need to reset here            
            	childX = layoutItem.actualPosition.x;

            // Vertical position
            if (!isNaN(vCenter))
                childY = Math.round((unscaledHeight - actualSize.y) / 2 + vCenter);
            else if (!isNaN(top))
                childY = top;
            else if (!isNaN(bottom))
                childY = unscaledHeight - actualSize.y - bottom;
           	else  // since setting actual size might have moved the actual position, we need to reset here
           		childY = layoutItem.actualPosition.y;

            // Set position
            layoutItem.setActualPosition(childX, childY);

            // update content limits
            maxX = Math.max(maxX, childX + actualSize.x);
            maxY = Math.max(maxY, childY + actualSize.y);
        }

        layoutTarget.setContentSize(maxX, maxY);

                extY += isNaN(bottom) ? 0 : bottom;
            }

            width = Math.max(width, extX + layoutElement.getPreferredWidth());
            height = Math.max(height, extY + layoutElement.getPreferredHeight());

            var elementMinWidth:Number = constraintsDetermineWidth(layoutElement) ? layoutElement.getMinWidth() : layoutElement.getPreferredWidth();
            var elementMinHeight:Number = constraintsDetermineHeight(layoutElement) ? layoutElement.getMinHeight() : layoutElement.getPreferredHeight();

            minWidth = Math.max(minWidth, extX + elementMinWidth);
            minHeight = Math.max(minHeight, extY + elementMinHeight);
        }

        layoutTarget.measuredWidth = Math.max(width, minWidth);
