Fixed link function, hopefully