fix bug when tag could be converted into an int