Fixed a bug in the link model.