I am unable to understand [Q value](https://en.wikipedia.org/wiki/Q_value_(nuclear_science)) for [positron emission](https://en.wikipedia.org/wiki/Positron_emission). The general reaction is as follows:

$$p \to n + e^+ + \nu$$
$$ ^A\_ZX \to ^A\_{Z-1}Y+ e^+ + \nu \tag{1a}$$

This reaction $(1a)$ was giving in my text. First question is that *where did one electron go*? We began with $Z$ electrons but on the right side it seems only $Z-1$ electrons are present. Maybe this is the cause of confusion.

So I rather took *this reaction $(2a)$ for positron emission*:

$$^A\_ZX \to ^A\_{Z-1}Y+ e^+ + e^-+ \nu \tag{2a}$$

Now writing the Q value, we find the mass defect
$$[m\_n(^A\_ZX)-(m\_n(^A\_{Z-1}Y)+m\_{e^+}+m\_{e^-} +m\_\nu)]$$

here $m\_n(^A\_{Z}X)$ are mass of nuclei. Now we can rewrite in terms of atomic mass numbers $m\_a(^A\_{Z}X)$ as

$$\Delta m=[(m\_a(^A\_ZX)-Zm\_e)-((m\_a(^A\_{Z-1}Y)-(Z-1)m\_e)+m\_{e^+} + m\_{e^-}+m\_\nu)] $$
$$\Delta m= (m\_a(^A\_ZX)-m\_a(^A\_{Z-1}Y) - 3m\_e -m\_\nu) \tag{2b} $$

but as you can see, if we use reaction $(1a)$ then we will get 

$$\Delta m= (m\_a(^A\_ZX)-m\_a(^A\_{Z-1}Y) - 2m\_e -m\_\nu) \tag{1b} $$

Am I wrong somewhere? I have highlighted key points(mistakes) in italic.