What do I miss in the following?
Let $R$ be a commutative Noetherian ring with unit. A map $f:M\to N$ of $R$-modules is injective/surjective iff the associated map $f_p:M_p\to N_p$ on the localization is injective/surjective for every prime ideal $p$ of the ring $R$.
There is an isomorphism $M_p=M\otimes_R R_p$. A sequence $$0\to K\xrightarrow{k} M\xrightarrow{f} N\to 0$$ is exact iff $k$ is injective and $s$ is surjective. Hence the above sequence is exact iff for every prime ideal $p$ of $R$ the sequence $$0\to K\otimes_R R_p\xrightarrow{k'} M\otimes_R R_p\xrightarrow{f'} N\otimes_R R_p\to 0$$ is exact. But $R_p$ is not flat over $R$ in general, is it? What am I missing? Is the sequence still exact if I tensor with the residue field $R_p/m_p$?
Thank you!