fix scopes not rebinding on re-adding element, clean up after ourselves