diff --git a/Changes b/Changes
index 3390d95..0f0ddee 100644
--- a/Changes
+++ b/Changes
@@ -1,4 +1,4 @@
-0.52 2015-06-30
+0.52 2015-07-02
         - [bugfix] Fixed payload filtering in FocusSpans (margaretha)
 	- [workaround] Reintroduced empty collection support,
 	  as Koral still creates them (diewald)
@@ -16,10 +16,13 @@
 	  (Kustvakt bug/diewald)
 	- [bugfix] Fixed treatment of several collection types (diewald)
 	- [bugfix] Remove legacy error handling in Match (diewald)
-	- [bugfix] JSON-serialization bug in match in case of error messages (diewald)
+	- [bugfix] JSON-serialization bug in match in case of
+	  error messages (diewald)
 	- [bugfix] 'fields' serialization (diewald)
 	- [bugfix] Deserialization of group:disjunction (diewald)
 	- [bugfix] Deserialization of wrapped spans (diewald)
+	- [bugfix] Fix KoralQuery mirroring in case of
+	  parsing failures (diewald)
 
 0.51 2015-03-17
         - This is a major version (prepared for the GitHub release)
diff --git a/src/main/java/de/ids_mannheim/korap/Krill.java b/src/main/java/de/ids_mannheim/korap/Krill.java
index 6dfed6b..ee6e42b 100644
--- a/src/main/java/de/ids_mannheim/korap/Krill.java
+++ b/src/main/java/de/ids_mannheim/korap/Krill.java
@@ -167,10 +167,10 @@
         if (json.has("query")) {
             try {
                 KrillQuery kq = new KrillQuery("tokens");
-                SpanQueryWrapper qw = kq.fromJson(json.get("query"));
-
                 this.setQuery(kq);
 
+                SpanQueryWrapper qw = kq.fromJson(json.get("query"));
+
                 // Throw an error, in case the query matches everywhere
                 if (qw.isEmpty())
                     this.addError(780, "This query matches everywhere");
@@ -212,20 +212,19 @@
 
                 // TODO: Temporary
                 if (collNode.fieldNames().hasNext()) {
-                    KrillCollection kc = new KrillCollection()
-                            .fromJson(collNode);
+                    KrillCollection kc = new KrillCollection();
                     this.setCollection(kc);
+                    kc.fromJson(collNode);
                 };
             }
 
             // <legacycode>
             else if (json.has("collections")) {
                 KrillCollection kc = new KrillCollection();
+                this.setCollection(kc);
                 for (JsonNode collection : json.get("collections")) {
                     kc.fromJsonLegacy(collection);
                 };
-
-                this.setCollection(kc);
             };
             // </legacycode>
         }
@@ -234,7 +233,8 @@
         };
 
         // Parse "meta" attribute
-        if (!this.hasErrors() && json.has("meta"))
+        // !this.hasErrors() && 
+        if (json.has("meta"))
             this.setMeta(new KrillMeta(json.get("meta")));
 
         return this;
diff --git a/src/main/java/de/ids_mannheim/korap/KrillIndex.java b/src/main/java/de/ids_mannheim/korap/KrillIndex.java
index c10e9b9..ed3b06e 100644
--- a/src/main/java/de/ids_mannheim/korap/KrillIndex.java
+++ b/src/main/java/de/ids_mannheim/korap/KrillIndex.java
@@ -1240,7 +1240,7 @@
         // Todo: Make kr subclassing ks - so ks has a method for a new Result!
         Result kr = new Result(query.toString(), meta.getStartIndex(),
                 meta.getCount(), meta.getContext());
-
+        
         // Set version info to result
         if (this.getVersion() != null)
             kr.setVersion(this.getVersion());
diff --git a/src/test/java/de/ids_mannheim/korap/query/TestTemporaryQueryLimitations.java b/src/test/java/de/ids_mannheim/korap/query/TestTemporaryQueryLimitations.java
index 180fecb..3d25377 100644
--- a/src/test/java/de/ids_mannheim/korap/query/TestTemporaryQueryLimitations.java
+++ b/src/test/java/de/ids_mannheim/korap/query/TestTemporaryQueryLimitations.java
@@ -22,6 +22,11 @@
 import org.junit.runner.RunWith;
 import org.junit.runners.JUnit4;
 
+/**
+ * These tests are meant to fail in a predictable way - but they describe
+ * temporary behaviour and will be disabled once these features are part of Krill.
+ */
+
 @RunWith(JUnit4.class)
 public class TestTemporaryQueryLimitations {
 
@@ -52,9 +57,9 @@
         assertEquals(kr.getStartIndex(), 0);
 
         assertEquals("This is a warning coming from the serialization", kr
-                .getWarning(1).getMessage());
+                     .getWarning(0).getMessage());
         assertEquals("Class reference checks are currently not supported"
-                + " - results may not be correct", kr.getWarning(0)
-                .getMessage());
+                     + " - results may not be correct", kr.getWarning(1)
+                     .getMessage());
     };
 };
diff --git a/src/test/java/de/ids_mannheim/korap/search/TestKrill.java b/src/test/java/de/ids_mannheim/korap/search/TestKrill.java
index fd2e7c3..87eeea3 100644
--- a/src/test/java/de/ids_mannheim/korap/search/TestKrill.java
+++ b/src/test/java/de/ids_mannheim/korap/search/TestKrill.java
@@ -2,6 +2,7 @@
 
 import static de.ids_mannheim.korap.TestSimple.getString;
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNull;
 
@@ -261,6 +262,41 @@
         assertEquals(kr.getTotalResults(), 0);
     };
 
+    /*
+     * Queries should be mirrored correctly for debugging reasons.
+     */
+    @Test
+    public void queryJSONmirrorTestBug () throws IOException {
+        // Construct index
+        KrillIndex ki = new KrillIndex();
+        String json = getString(getClass().getResource(
+            "/queries/bugs/failing_mirror.jsonld").getFile()
+        );
+        Krill ks = new Krill(json);
+        Result kr = ks.apply(ki);
+
+        ObjectMapper mapper = new ObjectMapper();
+        JsonNode res = mapper.readTree(kr.toJsonString());
+
+        assertEquals("Unable to parse JSON", res.at("/errors/0/1").asText());
+
+        json = getString(getClass().getResource(
+            "/queries/bugs/failing_mirror_2.jsonld").getFile()
+        );
+        ks = new Krill(json);
+        kr = ks.apply(ki);
+
+        res = mapper.readTree(kr.toJsonString());
+
+        assertEquals(23,res.at("/meta/count").asInt());
+        assertEquals(25,res.at("/meta/itemsPerPage").asInt());
+        assertEquals("base/s:p", res.at("/meta/context").asText());
+        assertFalse(res.at("/query").isMissingNode());
+        assertTrue(res.at("/query/@type").isMissingNode());
+        assertTrue(res.at("/collection/@type").isMissingNode());
+    };
+
+
 
     @Test
     public void searchJSONcontext () throws IOException {
diff --git a/src/test/resources/queries/bugs/failing_mirror.jsonld b/src/test/resources/queries/bugs/failing_mirror.jsonld
new file mode 100644
index 0000000..98f73d1
--- /dev/null
+++ b/src/test/resources/queries/bugs/failing_mirror.jsonld
@@ -0,0 +1,23 @@
+{
+  "@context":"http://korap.ids-mannheim.de/ns/koral/0.3/context.jsonld",
+  "messages":[
+    [303,"Deprecated 2014-07-24: 'min' and 'max' to be supported until 3 months from deprecation date."]
+  ],
+  "query":{
+    "wrap":{
+      "@type":"koral:term",
+      "key":"s"
+    }
+  },
+  "meta":{
+    "startPage":1,
+    "count":25,
+    "cutOff":true,
+    "context":"base/s:p"
+  },
+  "collection": {
+    "value": "Goethe",
+    "match": "match:eq",
+    "key": "author",
+  }
+}
diff --git a/src/test/resources/queries/bugs/failing_mirror_2.jsonld b/src/test/resources/queries/bugs/failing_mirror_2.jsonld
new file mode 100644
index 0000000..a89bc6c
--- /dev/null
+++ b/src/test/resources/queries/bugs/failing_mirror_2.jsonld
@@ -0,0 +1,22 @@
+{
+  "@context":"http://korap.ids-mannheim.de/ns/koral/0.3/context.jsonld",
+  "messages":[
+    [303,"Deprecated 2014-07-24: 'min' and 'max' to be supported until 3 months from deprecation date."]
+  ],
+  "query":{
+    "wrap":{
+      "@type":"koral:term",
+      "key":"s"
+    }
+  },
+  "meta":{
+    "startPage":2,
+    "count":23,
+    "context":"base/s:p"
+  },
+  "collection": {
+    "value": "Goethe",
+    "match": "match:eq",
+    "key": "author"
+  }
+}
