DOCs-2919: fixing maxDistance