Fixed int_to_string function