Fixed several bugs related to configuration management