fixed restore script