fixed errors and link generator