fix a bug in emails