 	s->lastlist = dlistid;
 	if(s->c == Split){
 		/* follow unlabeled arrows */
-		paddstate(l, s->out);
-		paddstate(l, s->out1);
+		if (s->out != NULL)
+			paddstate(l, s->out);
+		if (s->out1 != NULL)
+			paddstate(l, s->out1);
 		return;
 	}
 	l->s[l->n++] = s;

	int len = 0; 
	
	char * sc = s;
	while(sc != '\0') {
		len ++;
		sc += 1;
	}

	while (!isMatch && index <= len) {
		isMatch = pmatch(start, s + index, dl1, dl2);
		index ++;
	}


void pMatch(State *start, char **lines, int lineIndex, int nstate, int time) {
	//printCudaInfo(); 
	parallelMatch<<<1,1>>>(start,lines,lineIndex, nstate ,time);


	//TODO free states
