Bad conversions

Fixes small mistakes when converting between integers and strings.