diff --git a/web/app/static/js/modules/corpus_analysis/client/Client.js b/web/app/static/js/modules/corpus_analysis/client/Client.js
index 6d8a54e393c7c1589108efb4b2d45d3513fa8cf8..08c380ac91c9ffa942296b1aac4c38bff0e73aa9 100644
--- a/web/app/static/js/modules/corpus_analysis/client/Client.js
+++ b/web/app/static/js/modules/corpus_analysis/client/Client.js
@@ -136,7 +136,7 @@ class Client {
       tmp_first_cpos.push(results.data.matches[dataIndex].c[0]);
       tmp_last_cpos.push(results.data.matches[dataIndex].c[1]);
     }
-    nopaque.socket.emit('corpus_analysis_get_match_with_full_context',
+    this.socket.emit('corpus_analysis_get_match_with_full_context',
                         {type: resultsType,
                          data_indexes: dataIndexes,
                          first_cpos: tmp_first_cpos,
@@ -279,4 +279,4 @@ export {
   Client,
   ClientEventListener,
   ListenerCallback,
-};
\ No newline at end of file
+};
diff --git a/web/app/templates/corpora/analyse_corpus.html.j2 b/web/app/templates/corpora/analyse_corpus.html.j2
index af44f86f90d9b2a0528e6f53153d04139e5c5093..1a4659f4bee20ce6c3593dc9cceafd9a7e43e906 100644
--- a/web/app/templates/corpora/analyse_corpus.html.j2
+++ b/web/app/templates/corpora/analyse_corpus.html.j2
@@ -157,7 +157,7 @@ document.addEventListener("DOMContentLoaded", () => {
   // Initialize the client for server client communication in dynamic mode
   let corpusId = {{ corpus.id }}
   const client = new Client({'corpusId': corpusId,
-                             'socket': nopaque.socket,
+                             'socket': nopaque.appClient.socket,
                              'logging': true,
                              'dynamicMode': true});
   /**