Fix bug in compatibility due to new json cfg format.
Improve robustness of compatibility.