                 continue;
             }
             
-            if (hasPercentHeight(layoutElement) && variableRowHeight)
+            if (!isNaN(layoutElement.percentHeight) && variableRowHeight)
             {
                 totalPercentHeight += layoutElement.percentHeight;
 

        }
        else
        {
            if (hasPercentWidth(layoutElement))
               newWidth = calculatePercentWidth(layoutElement, width);
        }
        

                    continue;

                var layoutElementWidth:Number;
                if (!isNaN(layoutElement.percentWidth))
                    layoutElementWidth = calculatePercentWidth(layoutElement, targetWidth);
                else
                    layoutElementWidth = layoutElement.getPreferredBoundsWidth();
