Bug fix variable conflict $link