# Sign of the action for the harmonic osccilator?

I am confused about the derivation of the action $S(x,\mathbf{J})$ for a harmonic oscillator as given at page 219 in "Galactic Dynamics", J.Binney-S. Tremaine, 2nd Ed. 2008. The part of the derivation I am confused with is as follows. We have an action of the form: $$S_x(x,\mathbf{J})=K \int^x \mathrm dx'\varepsilon \sqrt{1-\frac{\omega_x^2x'^2}{K^2}}$$ where $\varepsilon$ is $\pm 1$ so that $S_x$ increases "along a path over the orbital torus". They then make the change of varibles $x=-\frac{K}{\omega_x} \cos(\psi)$ to get the expression: $$S_x(x,\mathbf{J})=\frac{K^2}{\omega_x} \int \mathrm d\psi' \sin^2(\psi')$$ I cannot here see where the $\varepsilon$ has gone, I feel it is absorbed into one of the $\sin$'s but I cannot justify why this is the case. Please can someone explain?