prevented dialogs from being cancelled by back button