diff --git a/CHANGES b/CHANGES
index 8430571..3b0f651 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+0.45 2014-10-01
+        - [bugfix] Correctly respond request in JSON results (diewald)
+
 0.44.1 2014-09-29
         - [cleanup] Prepare test suite for publication (diewald)
 
diff --git a/pom.xml b/pom.xml
index 7b8f0ab..efbf00e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,7 +24,7 @@
 
   <groupId>KorAP-modules</groupId>
   <artifactId>KorAP-lucene-index</artifactId>
-  <version>0.44.1</version>
+  <version>0.45</version>
   <packaging>jar</packaging>
 
   <name>KorAP-lucene-index</name>
diff --git a/src/main/java/de/ids_mannheim/korap/KorapResult.java b/src/main/java/de/ids_mannheim/korap/KorapResult.java
index b546c9c..6ec7991 100644
--- a/src/main/java/de/ids_mannheim/korap/KorapResult.java
+++ b/src/main/java/de/ids_mannheim/korap/KorapResult.java
@@ -146,33 +146,14 @@
 	this.warning = warning;
     };
 
-    @JsonIgnore
     public void setRequest(JsonNode request) {
         this.request = request;
-    }
-
+    };
 
     public JsonNode getRequest() {
         return this.request;
-    }
-
-    /*
-    @JsonIgnore
-    public void setBenchmarkSearchResults(long t1, long t2) {
-        this.benchmarkSearchResults =
-                (t2 - t1) < 100_000_000 ? (((double) (t2 - t1) * 1e-6) + " ms") :
-                        (((double) (t2 - t1) / 1000000000.0) + " s");
     };
 
-    public void setBenchmarkSearchResults(String bm) {
-	this.benchmarkSearchResults = bm;
-    };
-
-    public String getBenchmarkSearchResults() {
-        return this.benchmarkSearchResults;
-    }
-    */
-
     @JsonIgnore
     public void setBenchmarkHitCounter(long t1, long t2) {
         this.benchmarkHitCounter =
diff --git a/src/main/java/de/ids_mannheim/korap/KorapSearch.java b/src/main/java/de/ids_mannheim/korap/KorapSearch.java
index 7b2ff73..6d14e7e 100644
--- a/src/main/java/de/ids_mannheim/korap/KorapSearch.java
+++ b/src/main/java/de/ids_mannheim/korap/KorapSearch.java
@@ -115,7 +115,6 @@
 	};
     };
 
-
     // Maybe accept queryWrapperStuff
     public KorapSearch (SpanQueryWrapperInterface sqwi) {
 	this.query = sqwi.toQuery();
@@ -272,6 +271,7 @@
 	if (this.query == null) {
 	    KorapResult kr = new KorapResult();
 	    kr.setRequest(this.request);
+
 	    if (this.error != null)
 		kr.setError(this.error);
 	    else
diff --git a/src/test/java/de/ids_mannheim/korap/search/TestKorapResult.java b/src/test/java/de/ids_mannheim/korap/search/TestKorapResult.java
index 9f3288d..b99596c 100644
--- a/src/test/java/de/ids_mannheim/korap/search/TestKorapResult.java
+++ b/src/test/java/de/ids_mannheim/korap/search/TestKorapResult.java
@@ -1,7 +1,7 @@
 package de.ids_mannheim.korap.search;
 
 import java.util.*;
-import java.io.IOException;
+import java.io.*;
 
 import org.apache.lucene.search.spans.SpanQuery;
 
@@ -91,4 +91,88 @@
 	assertEquals("<span class=\"context-left\">ab</span><span class=\"match\"><em class=\"class-1 level-0\">a</em></span><span class=\"context-right\"></span>", res.at("/matches/6/snippet").asText());
 
     };
+
+    @Test
+    public void checkJSONResultForJSONInput () throws IOException  {
+	KorapIndex ki = new KorapIndex();
+	FieldDocument fd = new FieldDocument();
+	fd.addString("ID", "doc-1");
+	fd.addString("UID", "1");
+	fd.addTV("tokens",
+		 "abab",
+		 "[(0-1)s:a|i:a|_0#0-1|-:t$<i>4]" +
+		 "[(1-2)s:b|i:b|_1#1-2]" +
+		 "[(2-3)s:a|i:c|_2#2-3]" +
+		 "[(3-4)s:b|i:a|_3#3-4]");
+	ki.addDoc(fd);
+	fd = new FieldDocument();
+	fd.addString("ID", "doc-2");
+	fd.addString("UID", "2");
+	fd.addTV("tokens",
+		 "aba",
+		 "[(0-1)s:a|i:a|_0#0-1|-:t$<i>3]" +
+		 "[(1-2)s:b|i:b|_1#1-2]" +
+		 "[(2-3)s:a|i:c|_2#2-3]");
+	ki.addDoc(fd);
+
+	// Commit!
+	ki.commit();
+
+
+	String json = getString(getClass().getResource("/queries/bsp-result-check.jsonld").getFile());
+	KorapSearch ks = new KorapSearch(json);
+	KorapResult kr = ks.run(ki);
+	assertEquals(7, kr.getTotalResults());
+
+	ObjectMapper mapper = new ObjectMapper();
+	JsonNode res = mapper.readTree(kr.toJSON());
+
+	assertEquals(7, res.at("/totalResults").asInt());
+	assertEquals("spanOr([tokens:s:a, tokens:s:b])", res.at("/query").asText());
+	assertEquals(5, res.at("/itemsPerPage").asInt());
+	assertEquals(0, res.at("/startIndex").asInt());
+	assertEquals(1, res.at("/request/meta/startPage").asInt());
+	assertEquals(5, res.at("/request/meta/count").asInt());
+	assertEquals("token", res.at("/request/meta/context/left/0").asText());
+	assertEquals(3, res.at("/request/meta/context/left/1").asInt());
+	assertEquals("char", res.at("/request/meta/context/right/0").asText());
+	assertEquals(6, res.at("/request/meta/context/right/1").asInt());
+
+	assertEquals("korap:group", res.at("/request/query/@type").asText());
+	assertEquals("operation:or", res.at("/request/query/operation").asText());
+
+	assertEquals("korap:token", res.at("/request/query/operands/0/@type").asText());
+	assertEquals("korap:term", res.at("/request/query/operands/0/wrap/@type").asText());
+	assertEquals("orth", res.at("/request/query/operands/0/wrap/layer").asText());
+	assertEquals("a", res.at("/request/query/operands/0/wrap/key").asText());
+	assertEquals("match:eq", res.at("/request/query/operands/0/wrap/match").asText());
+
+	assertEquals("korap:token", res.at("/request/query/operands/1/@type").asText());
+	assertEquals("korap:term", res.at("/request/query/operands/1/wrap/@type").asText());
+	assertEquals("orth", res.at("/request/query/operands/1/wrap/layer").asText());
+	assertEquals("b", res.at("/request/query/operands/1/wrap/key").asText());
+	assertEquals("match:eq", res.at("/request/query/operands/1/wrap/match").asText());
+
+	assertEquals(1, res.at("/matches/0/UID").asInt());
+	assertEquals("doc-1", res.at("/matches/0/docID").asText());
+	assertEquals("match-doc-1-p0-1", res.at("/matches/0/ID").asText());
+	assertEquals("<span class=\"context-left\"></span><span class=\"match\">a</span><span class=\"context-right\">bab</span>", res.at("/matches/0/snippet").asText());
+
+    };
+
+
+    public static String getString (String path) {
+	StringBuilder contentBuilder = new StringBuilder();
+	try {
+	    BufferedReader in = new BufferedReader(new FileReader(path));
+	    String str;
+	    while ((str = in.readLine()) != null) {
+		contentBuilder.append(str);
+	    };
+	    in.close();
+	} catch (IOException e) {
+	    fail(e.getMessage());
+	}
+	return contentBuilder.toString();
+    };
 };
