Convert k/v to string before storing them. Fixes #3357