fixing query ordering in tests
Merge branch 'master' into gh-pages

* master:
  fixing query ordering in tests