Fixed test port
diff --git a/templates/api-communication.html.ep b/templates/api-communication.html.ep
index 30034af..332f3bd 100644
--- a/templates/api-communication.html.ep
+++ b/templates/api-communication.html.ep
@@ -1,6 +1,6 @@
 % use JSON::XS;
 
-% if (stash('test_port') && search->api_request) {
+% if (korap_test_port() && search->api_request) {
 <pre class="query api" onclick="this.classList.toggle('active')">
   <span>API Response for </span>
   <span style="font-size: 70%"><%= search->api_request %></span>
diff --git a/templates/collections.html.ep b/templates/collections.html.ep
index 0102536..7399ea4 100644
--- a/templates/collections.html.ep
+++ b/templates/collections.html.ep
@@ -12,6 +12,6 @@
   </li>
 % };
 </ul>
-% if (stash('test_port')) {
+% if (korap_test_port()) {
 <p style="font-size: 9pt; padding-left: 1em">Index port: <%= $c->url_for($c->config('KorAP')->{'api-0.1'})->port %></p>
 % };
diff --git a/templates/query.html.ep b/templates/query.html.ep
index 8f58838..b0cd0a4 100644
--- a/templates/query.html.ep
+++ b/templates/query.html.ep
@@ -1,7 +1,7 @@
 % use JSON::XS;
 % use Mojo::JSON;
 
-% if (search->query_jsonld && stash('test_port')) {
+% if (search->query_jsonld && korap_test_port()) {
 %   my $action;
 %   if (param('action') && param('action') eq 'inspect') {
 %     $action = ' active" style="cursor: default';