Make sure simple integer values are stored correctly

Somehow this didn't work right. I think it got closed by accident as I put the wrong link in the other PR.