fixed bug in rulegroup create code