vcs: fix bug in head