undo and delete buttons removed when undo is clicked