destroy dialog on hide