Notification query fix