Fix negated operation querying