Fix wrong lastCommitId issue.