travelInShortestPath: change the loop breaks's condition, if the post value is less then pre value, clear the counter, else incremnent