added indices for tags in tag tables