fixed rare counting problem when substituting tags
extended tag substitution list and added a note