Corrected bugs in DFA build and update.