locking fixes and adjustments