fix bug for no metadata_conn