bug fix for smtp