Improve pathfinding refresh