Fixed pathfinding issue.