Fixed query service.

Change-Id: Ie1056c3d5a2fc303bc7695f2e0343be42874b56c
diff --git a/src/main/java/de/ids_mannheim/korap/service/QueryService.java b/src/main/java/de/ids_mannheim/korap/service/QueryService.java
index 5d0a4f9..04b5f1c 100644
--- a/src/main/java/de/ids_mannheim/korap/service/QueryService.java
+++ b/src/main/java/de/ids_mannheim/korap/service/QueryService.java
@@ -146,14 +146,17 @@
         Iterator<QueryDO> i = queryList.iterator();
         while (i.hasNext()) {
             query = i.next();
-            String statistics = computeStatisticsForVC(query, queryType);
+            String statistics = computeStatisticsForVC(query, queryType, 
+            		apiVersion);
 			QueryDto dto = converter.createQueryDto(query, statistics);
 			dtos.add(dto);
 		}
 		return dtos;
     }
     
-	private String computeStatisticsForVC (QueryDO query, QueryType queryType)
+    
+	private String computeStatisticsForVC (QueryDO query, QueryType queryType, 
+			double apiVersion)
 			throws KustvaktException {
 		if (config.includeStatisticsInVCList() && 
 				queryType.equals(QueryType.VIRTUAL_CORPUS)) {		
@@ -161,7 +164,7 @@
     		if (query.isCached()) {
     			List<String> cqList = new ArrayList<>(1);
     			cqList.add("referTo " + query.getName());
-    			json = buildKoralQueryFromCorpusQuery(cqList);
+    			json = buildKoralQueryFromCorpusQuery(cqList, apiVersion);
     		}
     		else {
     			json = query.getKoralQuery();