fixed bugs in compute discrete geodesics..

fixed bugs in compute discrete geodesics..