fix polymorphic functor