Minor query engine fix