fixed problem when rules had same target class and grouping class