Fixed bug when creating invitations