Fixed a non-determinism in TSP