diff --git a/apps/maarch_entreprise/admin/history/history.php b/apps/maarch_entreprise/admin/history/history.php
index d623789e7fa590eef226a97e8986b7e87d51fc60..9f116380226ec02ef8cb29c02621d19971619f48 100755
--- a/apps/maarch_entreprise/admin/history/history.php
+++ b/apps/maarch_entreprise/admin/history/history.php
@@ -51,12 +51,12 @@ $core_tools2->manage_location_bar($page_path, $page_label, $page_id, $init, $lev
 /***********************************************************/
 $db = new Database();
 
-$where = '';
+$where    = '';
 $arrayPDO = array();
-$label = '';
-$tab = array();
-$modules = array();
-$stmt = $db->query("SELECT DISTINCT id_module FROM ".$_SESSION['tablename']['history']);
+$label    = '';
+$tab      = array();
+$modules  = array();
+$stmt = $db->query("SELECT DISTINCT ON(lower(id_module)) id_module FROM history WHERE id_module NOT IN ('null') ORDER BY lower(id_module)");
 while ($res = $stmt->fetchObject()) {
     if ($res->id_module == 'admin') {
         array_push($modules, array('id' => 'admin', 'label' => _ADMIN));
@@ -124,7 +124,7 @@ if (isset($_REQUEST['search'])  ||
             $history_module=$_SESSION['m_admin']['history']['module'];
         }
         if (!empty($history_module)) {
-            $where .= "  ".$_SESSION['tablename']['history'].".id_module = ? and";
+            $where .= "  lower(".$_SESSION['tablename']['history'].".id_module) = lower(?) and";
             $arrayPDO = array_merge($arrayPDO, array($history_module));
         }
     }
diff --git a/core/manage_action.php b/core/manage_action.php
index af48fa8dc9b9dfc5ad34040edf61490cc379f3ad..daf3ceef337e19e73af893be66b4a28d253b27b1 100755
--- a/core/manage_action.php
+++ b/core/manage_action.php
@@ -435,6 +435,9 @@ else if(empty($_POST['values']) || !isset($_POST['action_id']) || empty($_POST['
                 }
                 $_SESSION['info'] = $what . ' ';
                 $_SESSION['cpt_info_basket'] = 0;
+                if($_POST['module'] == 'null'){
+                    $_POST['module'] = '';
+                }
                 $hist->add(
                     $_POST['table'],
                     $arr_res[$i],'ACTION#'.$id_action, $id_action,