Fixed bool parameter parsing.
Added query parsing error reporting.