fixed issues when config file is invalid