#118 fix bug where dialog could not be closed