fix small bug on query builder