v16

Added fix from v15 to second pathfinding loop