Fix method for getting links