fixed lat lon flip in distance algo