Improve link icon logic