fixed bugs in create an iframe