fixed bug to load config correctly