Proper string parsing to ints