Fix notification logic.