more locking fixes to make sonar happy :)