Fix bugs of config validation. Fix test/config.yaml according to the new rules.