Fixed dead lock imported in last patch
Merge pull request #530 from soarqin/official

Fixed dead lock imported in last patch
Merge pull request #3 from Fluorohydride/master

merge last commit