Fix some mistakes in PathFunctor.