Fixed crash on invalid data in XML files