avoid maximum stack depth for recursive checkURL