some bugs were fixed in DFA and simulator