fix rule.declarations.length undefined