lib: fix mismatch between keys and values formal types