Fixed bugs in config file generation