prevent dialog from being cancelled