diff --git a/themes/finc/js/lightbox_form_cache.js b/themes/finc/js/lightbox_form_cache.js
index bbda19c1ec58f3839618966b7896ed348092eda6..2e8aedcbbbfaa6187e592684c321aa0824684b65 100644
--- a/themes/finc/js/lightbox_form_cache.js
+++ b/themes/finc/js/lightbox_form_cache.js
@@ -29,7 +29,9 @@ document.addEventListener('DOMContentLoaded', function () {
     const inputs = Array.from(form.querySelectorAll('input:not([type=password])'))
         .concat(Array.from(form.querySelectorAll('textarea')));
     JSON.parse(cache.getItem(cacheKey) || '[]').forEach(function (value, index) {
-      inputs[index].value = value;
+      if (inputs[index]) {
+        inputs[index].value = value;
+      }
     });
 
     modal.querySelectorAll('a:not([data-reset-forms]):not(#cart-confirm-empty):not(#cart-confirm-delete)').forEach(function (link) {
diff --git a/themes/finc/templates/cart/cart.phtml b/themes/finc/templates/cart/cart.phtml
index ca99a0462f57a471d4b288bcef138c773b972ea0..6bff5ff8b406389c5f0fb1f90f7aaa1d2751c0cf 100644
--- a/themes/finc/templates/cart/cart.phtml
+++ b/themes/finc/templates/cart/cart.phtml
@@ -46,7 +46,7 @@
             <a href="javascript:" id="cart-confirm-delete" title="<?=$this->transEscAttr('confirm_delete')?>" role="menuitem"><?=$this->transEscAttr('confirm_dialog_yes')?></a>
           </li>
           <li role="none">
-            <a href="javascript:" role="menuitem"><?=$this->transEsc('confirm_dialog_no')?></a>
+            <a role="menuitem"><?=$this->transEsc('confirm_dialog_no')?></a>
           </li>
         </ul>
       </div>
@@ -59,7 +59,7 @@
             <a href="javascript:" id="cart-confirm-empty" title="<?=$this->transEscAttr('bookbag_confirm_empty')?>" role="menuitem"><?=$this->transEsc('confirm_dialog_yes')?></a>
           </li>
           <li role="none">
-            <a href="javascript:" id="cart-refuse-empty" role="menuitem"><?=$this->transEsc('confirm_dialog_no')?></a>
+            <a id="cart-refuse-empty" role="menuitem"><?=$this->transEsc('confirm_dialog_no')?></a>
           </li>
         </ul>
       </div>