fixes error in fix_affiliation