vcs: fix bug in tag setting