Fix bug on email notifications