diff --git a/src/frontend/app/indexation/indexation.component.ts b/src/frontend/app/indexation/indexation.component.ts
index 410da1f210badb6939c5f47278ec54413aba1c09..d47c9b8646ef6cb49d9aba4476ea39da0863eea4 100644
--- a/src/frontend/app/indexation/indexation.component.ts
+++ b/src/frontend/app/indexation/indexation.component.ts
@@ -65,11 +65,14 @@ export class IndexationComponent implements OnInit {
             this.http.get("../../rest/indexingModels").pipe(
                 tap((data: any) => {
                     this.indexingModels = data.indexingModels;
-                    this.currentIndexingModel = this.indexingModels.filter(model => model.default === true)[0];
-                    if (this.currentIndexingModel === undefined) {
-                        this.currentIndexingModel = this.indexingModels[0];
-                        this.notify.error(this.lang.noDefaultIndexingModel);
+                    if(this.indexingModels.length > 0) {
+                        this.currentIndexingModel = this.indexingModels.filter(model => model.default === true)[0];
+                        if (this.currentIndexingModel === undefined) {
+                            this.currentIndexingModel = this.indexingModels[0];
+                            this.notify.error(this.lang.noDefaultIndexingModel);
+                        }
                     }
+                    
                     if (this.appService.getViewMode()) {
                         setTimeout(() => {
                             this.sidenavLeft.open();
diff --git a/src/frontend/app/viewer/document-viewer.component.ts b/src/frontend/app/viewer/document-viewer.component.ts
index 240e41e8ed6589482ba7f38697ec50cb3f250033..aeba12b19bf0d0b6b8872442e7e3b12604ef0dbe 100644
--- a/src/frontend/app/viewer/document-viewer.component.ts
+++ b/src/frontend/app/viewer/document-viewer.component.ts
@@ -18,6 +18,7 @@ import { PDFProgressData } from 'ng2-pdf-viewer';
     templateUrl: "document-viewer.component.html",
     styleUrls: [
         'document-viewer.component.scss',
+        '../indexation/indexing-form/indexing-form.component.scss',
     ],
     providers: [NotificationService, AppService, SortPipe]
 })