I am reading the article by Lawrence and Venkatesh on diophantine problems and $p-$adic period mappings. At page $35$ they say that the dimension of the Prym variety of an (unramified) cover of curves $C_1' \to C_2$ of degree $q$ is

$$(2g-1) \cdot \frac{q-1}{2},$$

where $g$ is the genus of $C_2$. The Prym variety is defined as $$\text{coker}(\text{Pic}^0(C_2) \to \text{Pic}^0(C_1')).$$

Riemann-Hurwitz tells us that the genus of $C_1'$ is

$$g' = q(g-1)+1.$$ Since the cover is surjective, I expected the map of Jacobians to be injective (is this true?). If that is the case, the dimension of the cokernel should be just the difference of the dimensions of the Jacobians, which are just the genera of the curves:

$$ g'-g=(q-1)(g-1).$$

This is off by $\frac{q-1}{2}$ with respect to the correct dimension. What am I doing wrong?