A small improvement in get_comp_hd()