Fixed the restore part