Fixed a few bugs related to inviting students to teams.