Fix class, reinsert undo
Change undo logic