fix #26 when tag name equals tag pattern