fixed typo: v in kvdict should be an 'int'