Clear distance result before distance computation.

  - result is not clear in function call.