Fixed bug causing infinite loop in getDistanceTo.

- due to a missing equal sign.