Fixed undo of copy-paste