Bug fixes to archive manager