diff --git a/ecrire/inc_presentation.php3 b/ecrire/inc_presentation.php3
index 3558c3be10868c3c08701eddf2af9762b3cc2f76..1eccab48875cf088a1f7c9a43243510c67e04510 100644
--- a/ecrire/inc_presentation.php3
+++ b/ecrire/inc_presentation.php3
@@ -489,9 +489,10 @@ function afficher_tranches_requete(&$query, $colspan) {
 
 	$query = trim($query);
 	$query_count = eregi_replace('^(SELECT)[[:space:]].*[[:space:]](FROM)[[:space:]]', '\\1 COUNT(*) \\2 ', $query);
-	$query_count = eregi_replace('ORDER[[:space:]]+BY.*$', '', $query);
-	
+	$query_count = eregi_replace('ORDER[[:space:]]+BY.*$', '', $query_count);
+
 	list($num_rows) = spip_fetch_array(spip_query($query_count));
+	
 	if (!$num_rows) return;
 
 	$nb_aff = 10;
diff --git a/ecrire/mots_tous.php3 b/ecrire/mots_tous.php3
index de7ed7be3906a1d4b4a8b283fc96818571001874..0bda40be25e892cc014642e66e6dad961f1d6df7 100644
--- a/ecrire/mots_tous.php3
+++ b/ecrire/mots_tous.php3
@@ -249,6 +249,8 @@ while ($row_groupes = spip_fetch_array($result_groupes)) {
 		echo "<div class='liste'>";
 		echo "<table border=0 cellspacing=0 cellpadding=3 width=\"100%\">";
 
+		echo $tranches;
+
 		$result = spip_query($query);
 		while ($row = spip_fetch_array($result)) {
 		
@@ -256,7 +258,6 @@ while ($row_groupes = spip_fetch_array($result_groupes)) {
 			
 			$id_mot = $row['id_mot'];
 			$titre_mot = $row['titre'];
-			$multi = $row['multi'];
 			
 			if ($connect_statut == "0minirezo")
 				$aff_articles="prepa,prop,publie,refuse";