Bugfix in xmlutils
minor code optimizations for debugging