adding more defensive flash hiding and querySelector check