Merge pull request #3053 from vlakoff/get_config

Simplify code in get_config()