Replace strtonum with strtol calls