More fixes for pathfinding

This one was trouble.