fix a bug for links