new fix
collecting errors #296
cleaner fix when removing invalid XML characters #298