Fix a minor bug when creating emails