- fixed error where dialog would close unexpectedly