diff --git a/js/privatebin.js b/js/privatebin.js
index d411ebbe..717a3629 100644
--- a/js/privatebin.js
+++ b/js/privatebin.js
@@ -3814,7 +3814,8 @@ jQuery.PrivateBin = (function($, RawDeflate) {
*/
me.getPassword = function()
{
- return $passwordInput.val();
+ // when password is disabled $passwordInput.val() will return undefined
+ return $passwordInput.val() || '';
};
/**
diff --git a/tpl/bootstrap.php b/tpl/bootstrap.php
index d9909343..3378c8f6 100644
--- a/tpl/bootstrap.php
+++ b/tpl/bootstrap.php
@@ -72,7 +72,7 @@ endif;
?>
-
+
diff --git a/tpl/page.php b/tpl/page.php
index e3d67732..2b63d113 100644
--- a/tpl/page.php
+++ b/tpl/page.php
@@ -50,7 +50,7 @@ endif;
?>
-
+