         else
             localItems = [items];
              
-        if ((propertyName == null || propertyName == "content") && (dest is Group || dest is FxContainer))
+        if ((propertyName == null || propertyName == "content") && (dest is IVisualElementContainer))
         {
             for (i = 0; i < numAdded; i++)
-                dest.removeItemAt(startIndex);
+                IVisualElementContainer(dest).removeElementAt(startIndex);
         }
         else if (propertyName == null && dest is IChildList)
         {

                break;
        }    
        
        if ( (propertyName == null || propertyName == "content") && (dest is Group || dest is FxContainer))
        {
            addItemsToContentHolder(dest, localItems);
        }
        else if (propertyName == null && dest is IChildList)
        {

import mx.core.IChildList;
import mx.core.IDeferredInstance;
import mx.core.UIComponent;
import mx.core.IVisualElementContainer;

[DefaultProperty("itemsFactory")]

