fix miscellaneous email problems