fix custom class and polymorphic association