config write bug fix