Fix save settings and restore phone state