Change categories when editing a rule

#165