Bug fix on email notification