fix bug for first point linking