Modiy ProgressDialogFragment to avoid IllegalStateException