fix bug in config loading