fixing error in link.c