Verified fix for error emails