fix dialog rendering issue.