diff --git a/src/main/java/eu/hbp/mip/controllers/VariablesApi.java b/src/main/java/eu/hbp/mip/controllers/VariablesApi.java
index a08f7986c09caa9281b79ce79c888bfc1cbcaa68..d4ab18e7f9075b22edf0a2c4c2ab864bd322cfa9 100644
--- a/src/main/java/eu/hbp/mip/controllers/VariablesApi.java
+++ b/src/main/java/eu/hbp/mip/controllers/VariablesApi.java
@@ -143,7 +143,7 @@ public class VariablesApi {
     @ApiOperation(value = "Get query for histograms", response = Object.class)
     @Cacheable("vars_histogram_query")
     @RequestMapping(value = "/{code}/histogram_query", method = RequestMethod.GET)
-    public ResponseEntity<String> getHistogramQuery(
+    public ResponseEntity<MiningQuery> getHistogramQuery(
             @ApiParam(value = "code", required = true) @PathVariable("code") String code
     )  {
         LOGGER.info("Get query for histograms");
@@ -162,7 +162,7 @@ public class VariablesApi {
         query.setGrouping(groupings);
         query.setAlgorithm(new Algorithm("histograms", "Histograms", false));
 
-        return ResponseEntity.ok(histogramGroupings);
+        return ResponseEntity.ok(query);
     }