diff --git a/packages/file-handling/src/clipboard.js b/packages/file-handling/src/clipboard.js
index 44df2aa73c0559037142bdf4e7afd90eeb448f1c..4437c29e72f51a7ed94666cbe85b69e2472436c3 100644
--- a/packages/file-handling/src/clipboard.js
+++ b/packages/file-handling/src/clipboard.js
@@ -26,6 +26,7 @@ export class Clipboard extends ScopedElementsMixin(AdapterLitElement) {
         this.clipboardSelectBtnDisabled = true;
         this.tabulatorTable = null;
         this._onReceiveBeforeUnload = this.onReceiveBeforeUnload.bind(this);
+        this.boundSelectHandler = this.selectAllFiles.bind(this);
         this.filesToSave = [];
         this.numberOfSelectedFiles = 0;
         this.enabledTargets = 'local';
@@ -110,15 +111,6 @@ export class Clipboard extends ScopedElementsMixin(AdapterLitElement) {
         super.update(changedProperties);
     }
 
-    async firstUpdated() {
-        // Give the browser a chance to paint
-        await new Promise((r) => setTimeout(r, 0));
-        if (this._('#select_all')) {
-            let boundSelectHandler = this.selectAllFiles.bind(this);
-            this._('#select_all').addEventListener('click', boundSelectHandler);
-        }
-    }
-
     toggleCollapse(e) {
         const table = this.tabulatorTable;
         setTimeout(function () {
@@ -245,8 +237,6 @@ export class Clipboard extends ScopedElementsMixin(AdapterLitElement) {
             this.tabulatorTable.on("dataLoaded", this.dataLoadedFunction.bind(this));
         });
 
-
-
         //Register only one beforeunload Event for the clipboard warning
         if (!window.clipboardWarning) {
             window.addEventListener('beforeunload', this._onReceiveBeforeUnload, false);
@@ -312,6 +302,9 @@ export class Clipboard extends ScopedElementsMixin(AdapterLitElement) {
                     );
                 }
             }, 0);
+            if (this._('#select_all')) {
+                this._('#select_all').addEventListener('click', this.boundSelectHandler);
+            }
         }
     }
 
@@ -320,7 +313,6 @@ export class Clipboard extends ScopedElementsMixin(AdapterLitElement) {
         //window.removeEventListener('beforeunload', this._onReceiveBeforeUnload);
         super.disconnectedCallback();
         this.tabulatorTable.off("dataProcessed");
-
     }
 
     /**
diff --git a/packages/file-handling/src/nextcloud-file-picker.js b/packages/file-handling/src/nextcloud-file-picker.js
index 4ac50b8056a1654311917168b5fdb9c90842e8f2..f4bf1d9061728b8bca75113f1d6e08e1b98e46cc 100644
--- a/packages/file-handling/src/nextcloud-file-picker.js
+++ b/packages/file-handling/src/nextcloud-file-picker.js
@@ -76,6 +76,7 @@ export class NextcloudFilePicker extends ScopedElementsMixin(DBPLitElement) {
         this.disableRowClick = false;
         this.boundRefreshOnWindowSizeChange = this.refreshOnWindowSizeChange.bind(this);
         this.boundCancelNewFolderHandler = this.cancelNewFolder.bind(this);
+        this.boundSelectHandler = this.selectAllFiles.bind(this);
     }
 
     static get scopedElements() {
@@ -150,19 +151,6 @@ export class NextcloudFilePicker extends ScopedElementsMixin(DBPLitElement) {
         super.disconnectedCallback();
     }
 
-    async firstUpdated() {
-        // Give the browser a chance to paint
-        await new Promise((r) => setTimeout(r, 0));
-        if (this._('#select_all')) {
-            let boundSelectHandler = this.selectAllFiles.bind(this);
-            this._('#select_all').addEventListener('click', boundSelectHandler);
-        }
-        if (this.directoriesOnly && this._('#select_all_wrapper')) {
-            this._('#select_all_wrapper').classList.remove('button-container');
-            this._('#select_all_wrapper').classList.add('hidden');
-        }
-    }
-
     connectedCallback() {
         super.connectedCallback();
         const that = this;
@@ -316,7 +304,6 @@ export class NextcloudFilePicker extends ScopedElementsMixin(DBPLitElement) {
             this.tabulatorTable.on("rowAdded", this.rowAddedFunction.bind(this));
             this.tabulatorTable.on("dataLoaded", this.dataLoadedFunction.bind(this));
 
-
             if (
                 typeof this.allowedMimeTypes !== 'undefined' &&
                 this.allowedMimeTypes !== '' &&
@@ -436,6 +423,13 @@ export class NextcloudFilePicker extends ScopedElementsMixin(DBPLitElement) {
                     );
                 }
             }, 0);
+            if (this._('#select_all')) {
+                this._('#select_all').addEventListener('click', this.boundSelectHandler);
+            }
+            if (this.directoriesOnly && this._('#select_all_wrapper')) {
+                this._('#select_all_wrapper').classList.remove('button-container');
+                this._('#select_all_wrapper').classList.add('hidden');
+            }
         }
     }
 
@@ -2068,6 +2062,7 @@ export class NextcloudFilePicker extends ScopedElementsMixin(DBPLitElement) {
      */
     selectAllFiles() {
         let allSelected = this.checkAllSelected();
+
         if (allSelected) {
             this.tabulatorTable.getSelectedRows().forEach((row) => row.deselect());
         } else {
@@ -3158,6 +3153,7 @@ export class NextcloudFilePicker extends ScopedElementsMixin(DBPLitElement) {
             pkgName,
             'tabulator-tables/css/tabulator.min.css'
         );
+        
         return html`
             <div class="wrapper">
                 <link rel="stylesheet" href="${tabulatorCss}" />