fix cfg file loading