fixing sam upgrade