diff -u a/block_query.module b/block_query.module
--- a/block_query.module	2013-08-29 23:57:41.000000000 +0300
+++ b/block_query.module	2017-11-26 07:32:15.000000000 +0200
@@ -136,17 +136,13 @@
       // with different case.
       $page_match = FALSE;
       $queries = drupal_strtolower($block_queries[$block->module][$block->delta]);
+      
+      $queries_as_url=str_replace("%3D", "=", urlencode($queries));
+      $_GET_as_url=http_build_query($_GET);
+      $page_match=strpos($_GET_as_url,$queries_as_url);
 
-      foreach ($_GET as $getkey => $value) {
-        if (!is_array($getkey) and !is_array($value)) {
-          $getkeylower = drupal_strtolower($getkey);
-          $valuelower = drupal_strtolower($value);
-
-          if ($getkeylower != 'q' && !$page_match) {
-            $page_match = drupal_match_path($getkeylower . '=' . $valuelower, $queries);
-          }
-        }
-      }
+      if (!$page_match) {
+        unset($blocks[$key]);
 
       // When $block->visibility has a value of 0 (BLOCK_VISIBILITY_NOTLISTED),
       // the block is displayed on all pages except those listed in
@@ -159,6 +155,7 @@
         unset($blocks[$key]);
       }
     }
+   }
   }
 }
 
