Working on fixing QueryResolutionEngine