Corrected some test code for the distance function.