Try to prevent deadlocks when saving the configuration.