Use strtol instead of sscanf