fix error thrown when reopen dialog