added archive support
fixed some archive bugs