diff --git a/src/templates/app.html b/src/templates/app.html
index e9594d6f2..666dcfecc 100644
--- a/src/templates/app.html
+++ b/src/templates/app.html
@@ -104,14 +104,13 @@
-
+
diff --git a/static/js/note.js b/static/js/note.js
index d44fcf436..f81a1be9f 100644
--- a/static/js/note.js
+++ b/static/js/note.js
@@ -194,6 +194,8 @@ function loadNote(noteId) {
handleEncryption(note.detail.encryption > 0, false, () => {
$("#noteDetailWrapper").show();
+
+ // this may fal if the dialog has not been previously opened
try {
$("#encryptionPasswordDialog").dialog('close');
}