fix archive script