fix crash when invalid v provided