Fix email reports of errors