Merge pull request #1 from sluu99/master

fix lock/unlock and added some tests
Merge pull request #2 from sluu99/release

Merge pull request #1 from sluu99/master