Fixes a gen_functor bug.