Fix undo/redo bugs trimming on timeline.