Fix a bug in config validation