improved previous fix for testing for missing mods_xml field