Updated notification logic.