fix bug in email module.