diff --git a/optimizely.module b/optimizely.module
index 7364df4..23e4646 100644
--- a/optimizely.module
+++ b/optimizely.module
@@ -223,24 +223,42 @@ function optimizely_init() {
 
         // parse_url(request_uri(), PHP_URL_PATH);
         $current_path = current_path();
-
+				
         // Find comparable alias that could match the paths entered in the project entry
         $current_path_alias = drupal_get_path_alias($current_path);
-
-        foreach ($project_paths as $path_count => $target_path) {
-
-				  ($target_path == '<front>') ? $project_path = $current_path : $project_path = $current_path_alias;
-
-					if ( ( $row['include'] && drupal_match_path($project_path, $target_path) ) ||
-               ( !$row['include'] && !drupal_match_path($project_path, $target_path) ) ) {
-
-            drupal_add_js('http://cdn.optimizely.com/js/' . $row['project_code'] . '.js', 'external');
-
+				
+				if ( $row['include'] ) {
+					foreach ($project_paths as $path_count => $target_path) {
+					
+						$target_path == '<front>' ? $project_path = $current_path : $project_path = $current_path_alias;
+					
+						if ( drupal_match_path($project_path, $target_path) ) {
+						
+							drupal_add_js('http://cdn.optimizely.com/js/' . $row['project_code'] . '.js', 'external');
+						}
 					}
-
-				}
-
-      }
+				} 
+				
+				else {
+				
+					foreach ($project_paths as $path_count => $target_path) {
+					
+						$add_script = true;
+						
+						$target_path == '<front>' ? $project_path = $current_path : $project_path = $current_path_alias;
+					
+						if ( drupal_match_path($project_path, $target_path) ) {
+							$add_script = false;
+							break 1;
+						}
+					}
+					
+					if ($add_script) {
+						drupal_add_js('http://cdn.optimizely.com/js/' . $row['project_code'] . '.js', 'external');
+					}
+					       
+      	}  
+    	}
 
     }
 
