Fix some pathfinding weirdness