Fix bug in email reminders that prevented emails from being sent out