Trial with Tree builder
diff --git a/lib/Korap/Info.pm b/lib/Korap/Info.pm
index 2780ebb..bc8fc05 100644
--- a/lib/Korap/Info.pm
+++ b/lib/Korap/Info.pm
@@ -10,10 +10,13 @@
 
   my $foundry = '*';
   my %query = (foundry => '*');
-  if ($c->stash('foundry')) {
-    $query{foundry} = $c->stash('foundry');
-    if ($c->stash('layer')) {
-      $query{layer} = $c->stash('layer');
+  if ($c->param('foundry')) {
+    $query{foundry} = $c->param('foundry');
+    if ($c->param('layer')) {
+      $query{layer} = $c->param('layer');
+    };
+    if ($c->param('spans')) {
+      $query{spans} = 'true';
     };
   };
 
@@ -24,7 +27,7 @@
       )
     },
     html => sub {
-      my $match = $c->match_info($corpus_id, $doc_id, $match_id);
+      my $match = $c->match_info($corpus_id, $doc_id, $match_id, %query);
       if ($match->{error}) {
 	$c->notify(error => $match->{error});
 	return $c->render_exception('error');