Fix register bug on send mail