fixed bug in add tag