Fix the undo action bug and add undo test. Still thinking this truncate table feature needs more tests.