Cast integers to ints when parsing

- Cast integers to ints when parsing to avoid string related problems.
- Correct unit test to match.