Added maximum distance for applying vectors