Fix for batch sending of notification emails.