Correctly quote queries so that users don't have to