fix dialog bugs
Merge pull request #166 from zaojiahua/master

fix dialog bugs