fixes a bug when tags are concurrently created