bug fixes for archive.