fix bugs when no config file present