pathfinder code fix