Fixed the getDocumentElement bug
Hopefully fixed the mods recursive bug