Fix if write_connection config is null, default to connection.