corrected bug in scan_archive