after deleting, undo adds to the correct order