fix undo/redo buttons (the undo button was disabled after the first edit until you made a second one)