Add link function not working