Fixes

Fixed the infinite loop issue that could crop up after reloading an xml
file. Fixed namespaces