improve iframe handling