Fix Bug in Link Generation