In chapter 13.1 in 'Mesoscale Meteorology in Midlatitudes' (Markowski and Richardson,2011) they use a Bernoulli equation and the hydrostatic equation and a lot of assumptions to derive an equation that predicts the height $z_{crit}$ at where an air parcel with an initial height of $z_0$ that is advected towards a barrier loses all horizontal velocity. In their argumentation they state the following identity $$\dfrac{\partial p}{\partial z}(x,z) = \rho(x,z)c_p\theta(x,z)\dfrac{\partial \pi}{\partial z} (x,z)\tag{1}\label{wanted}$$ where $\pi(x,z)=\left(\frac{p(x,z)}{p_0}\right)^{\frac{R}{c_p}}$ is the Exner function with reference pressure $p_0\in\mathbb{R}_+$ constant, $p$ is pressure, $\theta$ is potential temperature, $\rho$ is density, and $c_p$ and $R$ are constant $\in \mathbb{R}_+$.
If I try to derive this equation by taking the partial derivative of $\pi$ with respect to height $z$ and use the identity $\pi(x,z)=\frac{T(x,z)}{\theta(x,z)}$ as can be found for example on wikipedia ($T$ is temperature), then I end up with (suppressing arguments $x$ and $z$ in favour of readability) $$\dfrac{\partial \pi}{\partial z} = \left(\frac{1}{p_0}\right)^{\frac{R}{c_p}}\dfrac{\partial}{\partial z}\exp\left(\frac{R}{c_p}\log(p)\right)=\left(\frac{1}{p_0}\right)^{\frac{R}{c_p}}* \frac{T}{\theta}*{\frac{R}{c_p}}*\frac{1}{p}*\dfrac{\partial p}{\partial z}.$$ Multiplying this by $\rho c_p\theta$ we get $$\rho c_p \theta \dfrac{\partial \pi}{\partial z} = \left(\frac{1}{p_0}\right)^{\frac{R}{c_p}} \frac{T R \rho}{p}*\dfrac{\partial p}{\partial z}$$ and because $\frac{T R \rho}{p}=1$ by the ideal gas law we end up with $$\rho c_p \theta \dfrac{\partial \pi}{\partial z} = \left(\frac{1}{p_0}\right)^{\frac{R}{c_p}}\dfrac{\partial p}{\partial z}.$$ This is almost what is stated in $\eqref{wanted}$, but not quite and I do not know how to get rid of the factor $\left(\frac{1}{p_0}\right)^{\frac{R}{c_p}}$ resp. do not see why it remains unmentioned in the textbook. Any help is appreciated.