fix bug with facet queries