am cda8329e: Merge "Distance max set incorrectly"

* commit 'cda8329e37fa8588ba31f971f91a1257210a9768':
  Distance max set incorrectly