query builder fixes