TC: more improvements for iframe handling