Make intercept URL detection more robust