yet another fix for query engine.