Merge pull request #819 from wwwjfy/issue-811

fix #811, corner cases for async/await check