Remove caching of distance