In Algebraic Geometry and Arithmetic Curves of Qing Liu, I have two problems with the lemma 4.1.18 (page 119). The lemma is so: let $\mathcal{O}_K$ a DVR (uniformizing parameter $t$) with residue field $k$, $X$ an $\mathcal{O}_K$-scheme such that $\mathcal{O}_X(U)$ is flat over $\mathcal{O}_K$ for all open $U\subseteq X$. If $X_K$ is normal and $X_k$ reduced then $X$ is normal.
My first problem is that in the proof we're beginning to suppose that $X$ is affine. I understand the idea: if it is made for affine scheme and we take $X$ not affine then for all open affine $U\subseteq X$ one has $U$ normal. My problem is that it is not enough to conclude the normality of $X$ because I don't have the irreductility (Qing Liu has the definition of normality with normal at all points and irreducible). So my question is: how deduce the irreductibility of $X$ from my hypothesis?
My second problem: at a point in the proof we are reasonning in $A\otimes_{\mathcal{O}_K}K=A_t$ (with $A$ flat over $\mathcal{O}_K$ so that $A\subseteq A_t$) and we have $\alpha=\frac{a}{t^k}\in A_t$. Then QiL says that we can suppose that $a\notin tA$: why? I think it is equivalent to saying that $\cap_{k\in\mathbb{Z}}t^k A=(0)$, but I don't see why it should be true.
Assuming $X=\textrm{Spec }A$, we have $X_K=\textrm{Spec }(A\otimes_{\mathcal O_K}K)$, with $A\otimes_{\mathcal O_K}K$ integral because $X_K$ is normal. Since the canonical homomorphism $A\to A\otimes_{\mathcal O_K}K$ is injective, $A$ has to be integral as well. Hence $X=\textrm{Spec }A$ is irreducible.
I think the assumption $a\notin tA$ is because of this: note that if for some $s\geq 0$ we are able to write $\alpha=t^s\beta$, with $\beta\in A$, then $\alpha \in A$ and we win. Now, if $a$ were of the form $ta_1$, with $a_1\in A$, then $t^{-r}a=\alpha=t^{-r+1}a_1$. Yes, $-r+1$ might still be negative, but we can repeat the process with $a_1$ instead of $a$, and we get $\alpha=t^{-r+2}a_2$. After $r$ steps, we fall into $A$.
Edit. $X$ is integral (i.e. reduced and irreducible) even if it is not affine.
$X$ is reduced because it is covered by affine integral schemes. So assume $X$ is reducible, covered by two irreducible components $Z_1,Z_2\subset X$. Either they intersect, or they do not. If there is a point $x\in Z_1\cap Z_2$, then $\mathcal O_{X,x}$ has at least two minimal primes. But for every affine (hence integral) open subset $U\subset X$ containing $x$, $\mathcal O_{U,x}$ has only one minimal prime. Contradiction, since $\mathcal O_{X,x}\cong \mathcal O_{U,x}$.