--- D:/wamp/sites/russia.com/sites/all/modules/taxonomyblocks/taxonomyblocks.module.old	Thu Feb 26 01:52:48 2009
+++ D:/wamp/sites/russia.com/sites/all/modules/taxonomyblocks/taxonomyblocks.module	Tue May 26 12:54:00 2009
@@ -779,7 +779,7 @@
  * Returns NULL if False.
  */
 function term_has_nodes($tid) {
-  $nid = db_result(db_query("SELECT tn.nid FROM {term_node} tn, {node} n WHERE tn.tid = %d AND n.nid = tn.nid AND n.status = 1 ", $tid));
+  $nid = db_result(db_query(db_rewrite_sql("SELECT n.nid FROM  {term_node} tn, {node} n WHERE tn.tid = %d AND n.nid = tn.nid AND n.status = 1"), $tid));
   return $nid;
 }
 function tb_node_counter($tid, $nodecounter = 'all', $ch_count = 0) {
