limit the number of iterations in the path finder