fix bug of undo dismiss