fix type
use portable strtol