Fix mail_notifications hook