fixed a bug related to email