fix for sending exception emails