Make sure to zero out cv on error.