XS API changes, maxDistance hack fix