                     if ("parent" in target && target.parent)
                     {
                         parentW = target.parent.width;
-                    }
-                    else if ("elementHost" in target && target.elementHost)
-                    {
-                        parentW = target.elementHost.width;
                     }
                 }
 

                    {
                        parentH = target.parent.height;
                    }
                    else if ("elementHost" in target && target.elementHost)
                    {
                        parentH = target.elementHost.height;
                    }
                }
                
                // For 'right' or 'horizontalCenter' we need the parent width

                    else
                        parentStart.removeChild(target);
                }
            }
        }
    }
