Solve potential timing issue

Change-Id: I7edb7f58e7d03eb5f98b8bc9cf1e9c4776b816f6
diff --git a/Changes b/Changes
index 9fdc46b..1a9588d 100644
--- a/Changes
+++ b/Changes
@@ -1,3 +1,6 @@
+0.53 2024-02-19
+        - Solve a potential timing issue in VC rendering. (diewald)
+
 0.52 2023-11-29
         - Update Piwik dependency to point to matomo.js. (diewald)
         - Add addon to title and description. (diewald)
diff --git a/README.md b/README.md
index 768a951..ab32a00 100644
--- a/README.md
+++ b/README.md
@@ -303,7 +303,7 @@
 
 ### Original Software
 
-Copyright (C) 2015-2023, [IDS Mannheim](https://www.ids-mannheim.de/)<br>
+Copyright (C) 2015-2024, [IDS Mannheim](https://www.ids-mannheim.de/)<br>
 Author: [Nils Diewald](https://www.nils-diewald.de/), Helge Stallkamp<br>
 Contributor: Eliza Margaretha (Documentation), Susanne Feix (Translation),
 Leo Repp
diff --git a/dev/js/src/init.js b/dev/js/src/init.js
index 1e9a805..6243bc7 100644
--- a/dev/js/src/init.js
+++ b/dev/js/src/init.js
@@ -54,22 +54,6 @@
              pluginClass,
              pipeClass) {
 
-  const d = document;
-
-  // Set base URL
-  KorAP.URL = d.body.getAttribute('data-korap-url') || "";
-
-  // Get koralQuery response
-  const kqe = d.getElementById('koralQuery');
-  if (kqe !== null) {
-    KorAP.koralQuery = JSON.parse(kqe.getAttribute('data-koralquery') || "");
-  };
-  
-  // Create suffix if KorAP is run in a subfolder
-  KorAP.session = sessionClass.create(
-    KorAP.URL.length > 0 ? 'kalamarJS-' + KorAP.URL.slugify() : 'kalamarJS'
-  );
-
   // Override KorAP.log
   window.alertify = alertifyClass;
   KorAP.log = function (code, msg, src) {
@@ -89,20 +73,36 @@
 
   KorAP.vc = vcClass.create(vcArray); 
 
-  let gt;
-  if (gt = document.getElementById('link-guided-tour')) {
-    gt.setAttribute('href', '#');
-    gt.addEventListener('click', function(){
-      tourClass.gTstartSearch().start();
-    });
-    
-    KorAP.tourshowR = function(){
-      tourClass.gTshowResults().start();
-    };
-  };
-
   domReady(function (event) {
-      
+
+    const d = document;
+    
+    // Set base URL
+    KorAP.URL = d.body.getAttribute('data-korap-url') || "";
+  
+    // Create suffix if KorAP is run in a subfolder
+    KorAP.session = sessionClass.create(
+      KorAP.URL.length > 0 ? 'kalamarJS-' + KorAP.URL.slugify() : 'kalamarJS'
+    );
+
+    // Get koralQuery response
+    const kqe = d.getElementById('koralQuery');
+    if (kqe !== null) {
+      KorAP.koralQuery = JSON.parse(kqe.getAttribute('data-koralquery') || "");
+    };
+
+    let gt;
+    if (gt = document.getElementById('link-guided-tour')) {
+      gt.setAttribute('href', '#');
+      gt.addEventListener('click', function(){
+        tourClass.gTstartSearch().start();
+      });
+    
+      KorAP.tourshowR = function(){
+        tourClass.gTshowResults().start();
+      };
+    };
+    
     var obj = {};
 
     // What should be visible in the beginning?
diff --git a/lib/Kalamar.pm b/lib/Kalamar.pm
index f79c77c..0e924a3 100644
--- a/lib/Kalamar.pm
+++ b/lib/Kalamar.pm
@@ -8,7 +8,7 @@
 use List::Util qw!none uniq!;
 
 # Minor version - may be patched from package.json
-our $VERSION = '0.52';
+our $VERSION = '0.53';
 
 # Supported version of Backend API
 our $API_VERSION = '1.0';
@@ -416,7 +416,7 @@
 
 =head2 COPYRIGHT AND LICENSE
 
-Copyright (C) 2015-2023, L<IDS Mannheim|https://www.ids-mannheim.de/>
+Copyright (C) 2015-2024, L<IDS Mannheim|https://www.ids-mannheim.de/>
 Author: L<Nils Diewald|https://www.nils-diewald.de/>
 
 Kalamar is developed as part of the L<KorAP|http://korap.ids-mannheim.de/>
diff --git a/package.json b/package.json
index 9abf64d..dbea564 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
   "name": "Kalamar",
   "description": "Mojolicious-based Frontend for KorAP",
   "license": "BSD-2-Clause",
-  "version": "0.52.0",
+  "version": "0.53.0",
   "pluginVersion": "0.2.2",
   "engines": {
     "node": ">=6.0.0"