Fixed a bug in adding new tag attribute.