diff --git a/uc_upsell_core.inc b/uc_upsell_core.inc
index dbd5075..49d3b5d 100644
--- a/uc_upsell_core.inc
+++ b/uc_upsell_core.inc
@@ -1,4 +1,4 @@
-<?php
+﻿<?php
 /**
  * Get related items from the database and show them at the cart screen.
  * - If there aren't enough related products assigned in the admin, show a random selection.
@@ -294,7 +294,7 @@ function uc_upsell_get_tids_for_intersect($node) {
 
   foreach ($terms AS $term) {
     // If we are restricting by term id, only add the node to the array if the term exists in config.
-    if ($config['global']['restrict_terms'] && $config['global']['restrict_terms'][0] != 0) {
+    if ($config['global']['restrict_terms'] && !in_array(0, $config['global']['restrict_terms'])) {
       if (in_array($term->tid, $config['global']['restrict_terms'])) {
         $node_tids[] = $term->tid;
       }
