Fixed the conversion issue with some polymorphism