fixed link not getting copied to clipboard when running script from terminal