fix bugs with tags