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>