fixes in upgradev2 script