fix issue with string counter, and not serializing the right thing back