Fixed infinite link function loop