Fixed script to work correctly with distances with different units. Previously was not capturing 'm' units correctly.