Let $A$ be a ring and let $A_{\frak{p}}=S^{-1}A$ with $S=A-\frak{p}$. I know that if $A_{\frak{p}}$ is a domain for every $\frak{p}$ prime ideal that doesn't mean that $A$ is a domain. However, I have a proof of the opposite statement (which is obviously wrong) but I don't know where my mistake is. Could someone please point it out?
Take $x,y\in A$, so that $xy=0$ in $A$. Then take $s,s'\in S$. Therefore $x/s$ and $y/s'$ are elements in $A_{\frak{p}}$, and their product is $(xy)/(ss')=0/(ss')=0$ (the zero element in $A_{\frak{p}}$). But as $A_{\frak{p}}$ is a domain, either $x/s=0$ (which would mean $x=0$ in $A$) or $y/s'=0$ (which would mean $y=0$ in $A$). Therefore $A$ is an integral domain.
I think there is something about localization wings that I don't quite understand, and therefore I think I am doing something "illegal" in this proof.
Edit I think it might be the fact that $x/s=0$ in $A_{\frak{p}}$ doesn't mean that $x=0$ in $A$, but that $xu=0$ for some other $u\in A$