Bugfixes for config file loading