Improve cmd config fetching

It also improves code coverage :-)