fixed strtok bug