Fix query builder.