make the tags unique before looping over them