fixup strtok usage