Fixing bug with TrueClass and FalseClass in rule matching method