better base type resolution