Attempt to use snprintf instead of itoa and trim_leading_zero