Fix and test config-codec