various bug fixes to get_archive.php