Fixed some bugs wrt. invitations