Newton's Law of Gravitation

So I'm reading "Mathematical Physics" by Donald H.

Menzel, and I don't buy the following derivation from

section 2.12

The purpose of the derivation is derive the potential

energy at a point Po which is a distance Ro from the

center of a sphere of uniform density.

First they derive the amount an infinitesimal amount of

mass P(dv) located on the shell of the sphere contributes

to the potential energy at a point Po.

$$dV=-\frac{G \rho}{R}dxdydz$$

The following expression is given to compute the

potential energy contribution of the infinitesimal piece

of mas dV at P(dV) on a point Po.

$$V=-G\rho \int_r^{r+dr}\int_{\theata =0}^{\pi}\int_{\phi=0}^{2\pi}\frac{r^2sin^2( \theta ) dr d \theata d \phi }{R}$$
r is the distance from the center of the sphere to P(dV)
Ro is the distance from P to the center of the sphere
R is the distance from P(dV) to Po

A change in variables is derived by doing implicit

differentiation with r contant on the law of cosines:

$$R^2=R_o^2+r^2-2R_o r \ cos( \theta )$$

which gives:

$$R \ dR = R_o r sin( \theta ) d \theta$$

So far I agree but then they say that this implies:

$$V=-G\rho \int_r^{r+dr}\int_{R_o-r}^{R_o+r}\int_{0}^{2\pi}\frac{r}{R_o}drdR d \phi$$

However, if I do the above subsitution I get an extra factor of $$sin( \theta )$$ left over.

$$V= -G\rho \int \frac{1}{R} r^2 \sin\theta \, dr d\theta d\phi$$
$$V= -G\rho \int \frac{1}{R} r^2 \sin\theta \, dr d\theta d\phi$$