Some pathfinding fixes