diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php
index 368cf406185..26a4cacf2c9 100644
--- a/htdocs/accountancy/bookkeeping/list.php
+++ b/htdocs/accountancy/bookkeeping/list.php
@@ -430,7 +430,7 @@ print '';
print '';
$listofformat=AccountancyExport::getType();
-$button = '';
+$button = '';
if (count($filter)) $button.= $langs->trans("ExportFilteredList");
else $button.= $langs->trans("ExportList");
//$button.=' ('.$listofformat[$conf->global->ACCOUNTING_EXPORT_MODELCSV].')';
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 1465b0ea570..ba0057324e9 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -3469,8 +3469,8 @@ class Form
if ($selected) {
require_once DOL_DOCUMENT_ROOT .'/compta/bank/class/account.class.php';
$bankstatic=new Account($this->db);
- $bankstatic->fetch($selected);
- print $bankstatic->getNomUrl(1);
+ $result = $bankstatic->fetch($selected);
+ if ($result) print $bankstatic->getNomUrl(1);
} else {
print " ";
}