fixed bug in DigestRulesHelper