Fixed a bug: iframe document was not created sychronously.