reset instance state then dialog is closed
Merge branch 'master' into gh-pages