fix pathfinding bug...