Deadlock fix
Merge pull request #2 from jaycyb/master

Deadlock fix