Fixes issues with corrupt xml files