Fix unlock on merge
Merge pull request #973 from Morfent/patch-4

Fix unlock on merge