Fix more locking stuff