fixed undefined parent for cloned elements