Fixed some edge cases for geodesic length
Updating unit tests.