Fixed error in query.js where expr was not passed to queryDatabase.

FIxes issue #467