updated comment
destroy dialog only if it was not shown