diff --git a/datokenizer.go b/datokenizer.go
index 8a68753..cf3f9c4 100644
--- a/datokenizer.go
+++ b/datokenizer.go
@@ -18,10 +18,11 @@
 )
 
 const (
-	PROPS  = 1
-	SIGMA  = 2
-	STATES = 3
-	NONE   = 4
+	PROPS   = 1
+	SIGMA   = 2
+	STATES  = 3
+	NONE    = 4
+	NEWLINE = '\u000a'
 )
 
 // Special symbols in sigma
@@ -164,6 +165,9 @@
 					continue
 				}
 				elemint[0], err = strconv.Atoi(elem[0])
+				if err != nil {
+					break
+				}
 
 				if len(elem) > 1 {
 					elemint[1], err = strconv.Atoi(elem[1])
@@ -221,7 +225,7 @@
 				case 2:
 					{
 						arrin = elemint[0]
-						arrtarget = elemint[2]
+						arrtarget = elemint[1]
 						arrout = arrin
 					}
 				}
@@ -236,8 +240,29 @@
 				// While the states in foma start with 0, the states in the
 				// Mizobuchi FSA start with one - so we increase every state by 1.
 
-				if arrin != arrout && arrin != EPSILON && tok.sigma_rev[arrin] != '\n' {
-					panic("Problem: " + strconv.Itoa(arrstate) + " -> " + strconv.Itoa(arrtarget) + " (" + strconv.Itoa(arrin) + ":" + strconv.Itoa(arrout) + ") ")
+				/*
+					if arrin != arrout && arrin != EPSILON && tok.sigma_rev[arrin] != '\n' {
+						panic("Problem: " + strconv.Itoa(arrstate) + " -> " + strconv.Itoa(arrtarget) + " (" + strconv.Itoa(arrin) + ":" + strconv.Itoa(arrout) + ") ")
+					}
+				*/
+				if arrin != arrout {
+					if arrin == EPSILON && tok.sigma_rev[arrout] == NEWLINE {
+					} else if arrin != EPSILON && arrout == EPSILON {
+					} else {
+						panic(
+							"Problem: " +
+								strconv.Itoa(arrstate) +
+								" -> " + strconv.Itoa(arrtarget) +
+								" (" +
+								strconv.Itoa(arrin) +
+								":" +
+								strconv.Itoa(arrout) +
+								") (" +
+								string(tok.sigma_rev[arrin]) +
+								":" +
+								string(tok.sigma_rev[arrout]) +
+								")")
+					}
 				}
 
 				// TODO:
@@ -259,12 +284,16 @@
 					tok.transitions[arrstate+1] = make(map[int]*edge)
 				}
 
-				tok.transitions[arrstate+1][arrin] = targetObj
+				if arrin >= 0 {
+					tok.transitions[arrstate+1][arrin] = targetObj
+				}
 
 				if final {
 					tok.transitions[arrstate+1][FINAL] = &edge{}
 				}
 
+				fmt.Println("Add", arrstate+1, "->", arrtarget+1, "(", string(tok.sigma_rev[arrin]), ":", string(tok.sigma_rev[arrout]), ")")
+
 				continue
 			}
 		case SIGMA:
@@ -396,7 +425,7 @@
 }
 
 func (tok *Tokenizer) resize(l int) {
-	if len(tok.array) < l {
+	if len(tok.array) <= l {
 		tok.array = append(tok.array, make([]int, l)...)
 	}
 }
@@ -447,7 +476,7 @@
 // Set alphabet A to the list of all symbols
 // outgoing from s
 func (tok *Tokenizer) get_set(s int, A *[]int) {
-	for a, _ := range tok.transitions[s] {
+	for a := range tok.transitions[s] {
 		*A = append(*A, a)
 	}
 }
@@ -472,7 +501,7 @@
 			goto OVERLAP
 		}
 	}
-	fmt.Println("Found a nice place at", base, "for", len(symbols))
+	//	fmt.Println("Found a nice place at", base, "for", len(symbols))
 	return base
 }
 
@@ -481,33 +510,34 @@
 	t := 1 // Start position
 	chars := []rune(input)
 	i := 0
+	fmt.Println("Length of string is", len(chars))
 	for ; i < len(chars); i++ {
 		a := tok.sigma[chars[i]]
 		tu := t
 		t = tok.get_base(tu) + a
-		fmt.Println("Check", a, t, tok.get_check(1))
+		fmt.Println("Check", string(tok.sigma_rev[a]), ":", t)
 		if t > tok.get_check(1) {
+			fmt.Println("Out of array")
 			break
 		} else if tok.get_check(t) != tu {
+			fmt.Println("Match is not fine!", t, "and", tok.get_check(t), "vs", tu)
 			break
 		} else if tok.get_base(t) < 0 {
 			t = -1 * tok.get_base(t)
-			// fmt.Println("Match is representative!")
-		} else {
-			// fmt.Println("Match is fine!")
+			// } else {
 		}
 	}
 
 	if i == len(chars) {
 		fmt.Println("At the end")
 	} else {
+		fmt.Println("Not at the end")
 		return false
 	}
 
 	// fmt.Println("Hmm...", tok.get_check(tok.get_base(t)+FINAL), "-", t)
 
 	if tok.get_check(tok.get_base(t)+FINAL) == t {
-		fmt.Println("FINE")
 		return true
 	}
 	return false
