fixed a bug in save_config_g