[Tags]: fixed a bug in merging tags