fix config saving