More locking for connections