fix bugs related to config