fix issue with views being unregistered before they added to parent