fixes for mail delivery