fixed totalDistance in android app