diff --git a/include/Product.php b/include/Product.php
index 3362e72..5ff909f 100644
--- a/include/Product.php
+++ b/include/Product.php
@@ -122,38 +122,43 @@ class Product extends Entity {
             if(property_exists($this, $field)) {
                 if(match($values, $this->$field)) {
                     $matches[$field] = $this->$field;
+                } else {
+                    if($matchAll) {
+                        return array();
+                    }
                 }
             } else if(array_key_exists($field, $this->get_info())) {
                 if(match($values, $this->get_info()[$field])) {
                     $matches[$field] = $this->get_info()[$field];
+                } else {
+                    if($matchAll) {
+                        return array();
+                    }
                 }
             } else if($field == 'tag') {
                 foreach($this->get_tags() as $tag) {
                     if(match($values, $tag)) {
-                        $matches['tags'] = $this->get_tags();
+                        if(!array_key_exists('tags', $matches)) {
+                            $matches['tags'] = array();
+                        }
+                        $matches['tags'][] = $tag;
                         break;
+                    } else {
+                        if($matchAll) {
+                            return array();
+                        }
                     }
                 }
             } else if($field == 'status') {
                 if(match($values, $this->get_status())) {
                     $matches['status'] = $this->get_status();
+                } else {
+                    if($matchAll) {
+                        return array();
+                    }
                 }
             }
         }
-
-        if($matchAll && array_diff_assoc($terms, $matches)) {
-            print('=== DEBUG $terms ===<br>');
-            var_dump($terms);
-            print('<br><br>');
-            print('=== DEBUG diff $terms and $matches ===<br>');
-            var_dump(array_diff_assoc($terms, $matches));
-            print('<br><br>');
-            print('=== DEBUG $matches ===<br>');
-            var_dump($matches);
-            print('<br><br>');
-
-            return array();
-        }
         return $matches;
     }