fixed conditional type resolution for scalars