adjusted index for getting gid as needed when the tag column was added