minor fix in facets query gen