Fix bug of updating view after dismiss