scan: tweak the matching of types