Members Directory: Avatar link inconsistent


I am having trouble diagnosing an inconsistency in the Members Directory plugin. I am wondering what determines the link used when the user's avatar is clicked (see screenshot)?

We use this plugin to display student users. Some student user avatars link to their student sites, whereas other student user avatars link to (seemingly) random sites on our multisite unrelated to the student's site, and we're trying to figure out how to solve this issue. See our members directory page here. Perhaps I'm missing something really obvious.

Thanks so much for your help with this,