Fixed #3: mutex is unlocked before deleting its parent
Merge pull request #4 from alorence/ea3970980625f996908e052aa742b69f7c0b64ca

Fix issue #3: unlock mutex before deleting its parent