fix location distance in api and test