fixed type error on _endPath arg