Fixed the restore delayed script