Fix encoding bug with affiliations.