Add maxDistance attrib