Removed dialog.hide()