add some cof locking fixes