Possible fix to bug in email creation