fixed couple issues in reading config files