Error: Undefined variable: link