changed locking
Merge pull request #1308 from john-hill/PLFM-1655

changed locking