Fixed null reference exception with links