move external link check before event is fired