Fix bugs in config