Added support for negation in queries