Fixing query builder tests.
Merge pull request #259 from ngodfraind/exception-handling

Fixing query builder tests.