fixed some bugs in DFA
Merge branch 'workingDFA'