More locking issues fixed