Fix distance calculation, using floats :)