Fix sendNotificationEmails