fixed polymorphic type issues