Fixed a bug when printing a query altered it
Merge branch 'master' into 2.0