diff --git a/htdocs/categories/categorie.php b/htdocs/categories/categorie.php
index 05ff763d67f14db6c931a17e96bcdd9cb3cbd589..267d26c30ea276c57d6532af03b8b234dc441689 100644
--- a/htdocs/categories/categorie.php
+++ b/htdocs/categories/categorie.php
@@ -62,6 +62,7 @@ if ($id || $ref)
 		$elementtype = 'fournisseur';
 		$objecttype = 'societe&categorie';
 		$objectid = isset($id)?$id:(isset($socid)?$socid:'');
+		$dbtablename = '&societe';
 		$fieldid = 'rowid';
 	}
 	elseif ($type == 2) {
@@ -537,4 +538,4 @@ function formCategory($db,$object,$typeid,$socid=0)
 
 llxFooter();
 $db->close();
-?>
\ No newline at end of file
+?>
diff --git a/htdocs/fourn/fiche.php b/htdocs/fourn/fiche.php
index 6d8f453357d3b2d61f346e120a8a65a90d82be5c..254543f5960d5ea470c171cbb47959f3e5d24980 100644
--- a/htdocs/fourn/fiche.php
+++ b/htdocs/fourn/fiche.php
@@ -44,7 +44,7 @@ $action	= GETPOST('action');
 // Security check
 $id = (GETPOST('socid','int') ? GETPOST('socid','int') : GETPOST('id','int'));
 if ($user->societe_id) $id=$user->societe_id;
-$result = restrictedArea($user, 'societe&fournisseur', $id, '');
+$result = restrictedArea($user, 'societe&fournisseur', $id, '&societe');
 
 $object = new Fournisseur($db);
 
@@ -403,10 +403,10 @@ if ($object->fetch($id))
         // List of contacts
         show_contacts($conf,$langs,$db,$object,$_SERVER["PHP_SELF"].'?id='.$object->id);
     }
-    
-    // Addresses list
-    if (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) && ! empty($conf->global->MAIN_REPEATADDRESSONEACHTAB))
-    {
+
+    // Addresses list
+    if (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) && ! empty($conf->global->MAIN_REPEATADDRESSONEACHTAB))
+    {
     	$result=show_addresses($conf,$langs,$db,$object,$_SERVER["PHP_SELF"].'?socid='.$object->id);
     }