clean empty rulesets after removing a rule