Fixed functor not working for function ptr