Remove parenthesises from query

Fixes #2279