fixed bugs in create a iframe