Fix undo/redo having to click multiple times

Fix undo/redo having to click multiple times