fix invitation system