Fix notification logic