this should finally fix the issue with the multiple emails (closes #179)