Preventing duplicates from saved queries