lots of archive fixes