fixed a bug of upgrading data

fixed: not saving after upgrading data