Fixed Undo/Redo Actions

Only bug I ran into is if you type fast enough and then erase
everything, undo/redo crash because I guess the event’s didn’t get
added that fast? I’m not sure why…