improve tags storage/duplication prevention