Tests and improvements for invitations