fix email exporting.