modify warehouse restore function