fix dismiss view bug