             if (t == "")
                 t = " ";
     
-            return (border && border is IBorder ?
-                    IBorder(border).borderMetrics.top :
-                    0)  + measureText(t).ascent;
+            return (border && border is IRectangularBorder ?
+                    IRectangularBorder(border).borderMetrics.top :
+         			0)  + measureText(t).ascent;
         }
         
         if (!validateBaselinePosition())

    {
        super.measure();

        var bm:EdgeMetrics = border && border is IBorder ?
                             IBorder(border).borderMetrics :
                             EdgeMetrics.EMPTY;

        var w:Number;

        if (border)
        {
            border.setActualSize(unscaledWidth, unscaledHeight);
            bm = border is IRectangularBorder ?
                    IRectangularBorder(border).borderMetrics : EdgeMetrics.EMPTY;
        }
        else
        {
