fix exception inside functions and async
fix iframe inject code issue