Fixes an undefined variable issue in version API.