Some bug fix about email exception.