diff --git a/html/cgi-bin/ids.cgi b/html/cgi-bin/ids.cgi
index 56d39fd60..151181fdc 100644
--- a/html/cgi-bin/ids.cgi
+++ b/html/cgi-bin/ids.cgi
@@ -324,7 +324,7 @@ if ($cgiparams{'RULESET'} eq $Lang::tr{'save'}) {
}
# Check if a ruleset is present - if not or the source has been changed download it.
- unless ((%idsrules) || ($oldsettings{'RULES'} eq $cgiparams{'RULES'})) {
+ if((! %idsrules) || ($oldsettings{'RULES'} ne $cgiparams{'RULES'})) {
# Check if the red device is active.
unless (-e "${General::swroot}/red/active") {
$errormessage = "$Lang::tr{'could not download latest updates'} - $Lang::tr{'system is offline'}";