Bugfix for email notification