Fixes lock file removal
Merge pull request #4425 from abika/master

Fixes lock file removal