diff --git a/restrict_ip.module b/restrict_ip.module
index a9f6cb3..de3ef4a 100644
--- a/restrict_ip.module
+++ b/restrict_ip.module
@@ -243,7 +243,7 @@ function restrict_ip_boot()
 					$$name = $version->schema_version > -1;
 				}
 
-				if($access_denied && $countries && $ip2country)
+				if($access_denied && isset($countries) && isset($ip2country))
 				{
 					if(variable_get('restrict_ip_country_white_black_list', 0) == 1)
 					{
