undo/redo works now flawlessly (yay!)