Fix issue with component tree not entering the document