Setting leaf distance