fix strtol call