bugfix when send emails & notifications