fix badformat and addTag()