Fix locks not working
Merge branch 'bugfix/brokenLocks' into develop