fix bug in the addTag function (js bug for the popover printing)