fix a undo problem