Pathfinding fixes