Fix some vsgen bugs.