if has two same distance way, how to make path result always return the path which node index in the path is bigger?