fix a bug when sending invite email