Invite Teams refactor fix