Changed case for 2 arguments in query function

Updated per discussion in #1185
Merge pull request #1 from EC-Joe/patch-1

Changed case for 2 arguments in query function