clean up some rule numbering issues with template conversion.