Improve locking isolation in config.