#118 fix bug where dialog could not be closed
(cherry picked from commit 0b0a178ace630a2736674a4a2638165ffe6747cd)