Fix modal dismiss issue.