make sure distance is a float before rounding