Fixed bug in the range finder.