diff --git a/src/layouts/AppLayout.vue b/src/layouts/AppLayout.vue
index 2002269..7a2c342 100644
--- a/src/layouts/AppLayout.vue
+++ b/src/layouts/AppLayout.vue
@@ -44,7 +44,9 @@
     },
   },
   mounted() {
-    this.$root.$on('refresh-application', () => this.refresh());
+    require('@/eventBus').default.$on('refresh-application', () =>
+      this.refresh(),
+    );
     setInterval(() => {
       if (!localStorage.getItem('storedUsername')) {
         this.$eventBus.$consoleWindow?.close();
@@ -52,7 +54,16 @@
       }
     }, 10000);
   },
+  beforeUnmount() {
+    require('@/eventBus').default.$off(
+      'refresh-application',
+      this.handleRefreshApplication,
+    );
+  },
   methods: {
+    handleRefreshApplication() {
+      this.refresh();
+    },
     refresh() {
       // Clear all toast messages
       document.querySelectorAll('.toast').forEach((toast) => {
