fix a bug in config file generation