userId reference in invite module fixed