Fix a bug with saving the config file