fix generic reader with functor