Fixed undefined QueryEngine