Change categories when editing a rule

#165 
also check indentation of this line