             }
             case CalloutPosition.MIDDLE:
             {
-                registrationPoint.y = Math.floor((ownerHeight - height) / 2);
+                registrationPoint.y = Math.floor((ownerHeight - calloutHeight) / 2);
                 break;
             }
             case CalloutPosition.END:
             {
                 // The ends of the owner and callout are aligned
-                registrationPoint.y = (ownerHeight - height);
+                registrationPoint.y = (ownerHeight - calloutHeight);
                 break;
             }
             default: //case CalloutPosition.AFTER:

    {
        // Screen resize might require a new arrow direction and callout position
        invalidatePosition();
    }
}
}
        var ownerVisualElement:ILayoutElement = owner as ILayoutElement;
        var ownerWidth:Number = (ownerVisualElement) ? ownerVisualElement.getLayoutBoundsWidth() : owner.width;
        var ownerHeight:Number = (ownerVisualElement) ? ownerVisualElement.getLayoutBoundsHeight() : owner.height;
        var calloutWidth:Number = getLayoutBoundsWidth();
        var calloutHeight:Number = getLayoutBoundsHeight();

        switch (horizontalPos)
        {
