Changed case for 2 arguments in query function

Updated per discussion in #1185