fix restore method