changes to scan_keys