Fixed a small error in ComputeShortestPath