fixed locking bugs