Corrected handling of subclasses in conversions