diff --git a/Changes b/Changes
index 4c54d21..713b281 100644
--- a/Changes
+++ b/Changes
@@ -1,4 +1,4 @@
-0.60.2 2022-01-31
+0.60.2 2022-01-04
     - [security] More log4j updates (diewald)
     - [feature] Support for field value vector method (fixes #81; diewald)
 	- [cleanup] Moved and updated cache-tests from TestKrillCollectionIndex 
diff --git a/src/main/java/de/ids_mannheim/korap/response/VirtualCorpusResponse.java b/src/main/java/de/ids_mannheim/korap/response/VirtualCorpusResponse.java
index fd8a512..44c4ea8 100644
--- a/src/main/java/de/ids_mannheim/korap/response/VirtualCorpusResponse.java
+++ b/src/main/java/de/ids_mannheim/korap/response/VirtualCorpusResponse.java
@@ -1,26 +1,34 @@
 package de.ids_mannheim.korap.response;
 
 import java.util.List;
+import static de.ids_mannheim.korap.util.KrillString.quote;
 
 import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.node.ArrayNode;
 import com.fasterxml.jackson.databind.node.ObjectNode;
+import com.fasterxml.jackson.databind.util.RawValue;
 
 public class VirtualCorpusResponse extends Response {
 
     public JsonNode createKoralQueryForField (String fieldName,
             List<String> fieldValues) {
 
-        ArrayNode arrayNode = mapper.createArrayNode();
-        for (String v : fieldValues) {
-            arrayNode.add(v);
+        StringBuffer sb = new StringBuffer("[");
+        int size = fieldValues.size();
+        for (int i=0; i < size; i++) {
+            if (fieldValues.get(i).length() == 0)
+                continue;
+            sb.append(quote(fieldValues.get(i)));
+            if (i < size-1) {
+                sb.append(",");
+            }
         }
+        sb.append("]");
 
         ObjectNode collectionNode = mapper.createObjectNode();
         collectionNode.put("@type", "koral:doc");
         collectionNode.put("key", fieldName);
         collectionNode.put("type", "type:string");
-        collectionNode.set("value", arrayNode);
+        collectionNode.putRawValue("value", new RawValue(sb.toString()));
 
         ObjectNode root = mapper.createObjectNode();
         root.put("@context", KORAL_VERSION);
diff --git a/src/test/java/de/ids_mannheim/korap/search/TestVcField.java b/src/test/java/de/ids_mannheim/korap/search/TestVcField.java
index b9b24ce..2c27204 100644
--- a/src/test/java/de/ids_mannheim/korap/search/TestVcField.java
+++ b/src/test/java/de/ids_mannheim/korap/search/TestVcField.java
@@ -9,6 +9,7 @@
 import org.junit.Test;
 
 import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
 
 import de.ids_mannheim.korap.Krill;
 import de.ids_mannheim.korap.KrillIndex;
@@ -17,29 +18,31 @@
 
 public class TestVcField {
     private KrillIndex ki;
+    private ObjectMapper mapper = new ObjectMapper();
 
     private FieldDocument createFieldDoc (int uid, String textSigle) {
         FieldDocument fd = new FieldDocument();
         fd.addString("textSigle", textSigle);
         fd.setUID(uid);
         return fd;
-
     }
 
 
     public TestVcField () throws IOException {
         ki = new KrillIndex();
         ki.addDoc(createFieldDoc(1, "WPD/AAA/00001"));
-        
+
         FieldDocument fd = createFieldDoc(2, "WPD/AAA/00002");
         fd.addString("author", "Frank");
+        fd.addString("quote", "The \"quoted\" example");
+        fd.addString("empty", "");
         ki.addDoc(fd);
-        
+
         fd = createFieldDoc(3, "WPD/AAA/00003");
         fd.addTV("tokens", "a b c", "[(0-1)s:a|i:a|_0$<i>0<i>1|-:t$<i>3]"
                 + "[(2-3)s:b|i:b|_1$<i>2<i>3]" + "[(4-5)s:c|i:c|_2$<i>4<i>5]");
         ki.addDoc(fd);
-        
+
         ki.addDoc(createFieldDoc(4, "WPD/AAA/00004"));
         ki.commit();
         ki.addDoc(createFieldDoc(5, "WPD/AAA/00005"));
@@ -61,33 +64,51 @@
         String json = getJsonResource(file);
         JsonNode n = new Krill().retrieveFieldValues(json, ki, "textSigle");
 
-        System.out.println(n.toPrettyString());
         assertEquals(Response.KORAL_VERSION, n.at("/@context").asText());
         assertEquals("koral:doc", n.at("/corpus/@type").asText());
         assertEquals("textSigle", n.at("/corpus/key").asText());
         assertEquals("type:string", n.at("/corpus/type").asText());
-        assertEquals(2, n.at("/corpus/value").size());
 
-        assertEquals("WPD/AAA/00002", n.at("/corpus/value/0").asText());
-        assertEquals("WPD/AAA/00003", n.at("/corpus/value/1").asText());
-        
+        assertEquals("[\"WPD/AAA/00002\",\"WPD/AAA/00003\"]",
+                n.at("/corpus/value").toString());
+
         testRetrieveAuthorOfVc1(json);
         testRetrieveTokensOfVc1(json);
+        testRetrieveNullOfVc1(json);
+        testRetrieveQuoteOfVc1(json);
+        testRetrieveEmptyOfVc1(json);
     }
 
 
     private void testRetrieveAuthorOfVc1 (String json) {
         JsonNode n = new Krill().retrieveFieldValues(json, ki, "author");
         assertEquals("author", n.at("/corpus/key").asText());
-        assertEquals("Frank", n.at("/corpus/value/0").asText());        
+        assertEquals("[\"Frank\"]", n.at("/corpus/value").toString());
     }
 
 
     private void testRetrieveTokensOfVc1 (String json) {
         JsonNode n = new Krill().retrieveFieldValues(json, ki, "tokens");
         assertEquals("tokens", n.at("/corpus/key").asText());
-        assertEquals(1, n.at("/corpus/value").size());
-        assertEquals("a b c", n.at("/corpus/value/0").asText());
+        assertEquals("[\"a b c\"]", n.at("/corpus/value").toString());
+    }
+
+    private void testRetrieveNullOfVc1 (String json) {
+        JsonNode n = new Krill().retrieveFieldValues(json, ki, "hello");
+        assertEquals("hello", n.at("/corpus/key").asText());
+        assertEquals("[]", n.at("/corpus/value").toString());
+    }
+
+    private void testRetrieveQuoteOfVc1 (String json) {
+        JsonNode n = new Krill().retrieveFieldValues(json, ki, "quote");
+        assertEquals("quote", n.at("/corpus/key").asText());
+        assertEquals("[\"The \\\"quoted\\\" example\"]", n.at("/corpus/value").toString());
+    }
+
+    private void testRetrieveEmptyOfVc1 (String json) {
+        JsonNode n = new Krill().retrieveFieldValues(json, ki, "empty");
+        assertEquals("empty", n.at("/corpus/key").asText());
+        assertEquals("[]", n.at("/corpus/value").toString());
     }
 
 
@@ -97,7 +118,11 @@
         String file = "/queries/collections/named-vcs/named-vc3.jsonld";
         JsonNode n = new Krill().retrieveFieldValues(getJsonResource(file), ki,
                 "textSigle");
-        assertEquals(2, n.at("/corpus/value").size());
+        
+        n = mapper.readTree(n.at("/corpus/value").toString());
+        assertEquals(2, n.size());
+        assertEquals("WPD/AAA/00002", n.at("/0").asText());
+        assertEquals("WPD/AAA/00003", n.at("/1").asText());
     }
 
 
@@ -107,6 +132,9 @@
         String file = "/queries/collections/named-vcs/named-vc4.jsonld";
         JsonNode n = new Krill().retrieveFieldValues(getJsonResource(file), ki,
                 "textSigle");
-        assertEquals(3, n.at("/corpus/value").size());
-    }
+        n = mapper.readTree(n.at("/corpus/value").toString());
+        assertEquals(3, n.size());
+        assertEquals("WPD/AAA/00001", n.at("/0").asText());
+        assertEquals("WPD/AAA/00002", n.at("/1").asText());
+        assertEquals("WPD/AAA/00003", n.at("/2").asText());    }
 }
