bug fixed for fatal exception & async close
Merge pull request #631 from wenshao/master

bug fixed for fatal exception & async close