sam: fixing upgrade