Quick question regarding simple algebra in Bayesian statistics

In this paper you can see equation (11), the probability density, written as:

$$S_n(\xi) = \frac{1}{N}\frac{1}{2\pi\sigma_r(n)\sigma_g(n)} \sum\limits_{i=1}^{N}\, \exp\left[-\frac{1}{2}\left(\frac{x_i^2}{\sigma_r(n)}+\frac{y_i^2}{\sigma_g(n)} \right) \right]$$

never mind what each parameter represents, my question regards the next two steps, where it first defines the likelihood (eq. 12) as:

$L=\prod\limits_{n=1}^{M}\, S_n(\xi)$

and finally it applies a logarithm to that last equation to obtain (eq 13):

$$\ln \,L = -\sum\limits_{n=1}^{M} \ln\left\{N2\pi\sigma_r(n)\sigma_g(n)\,-\,\sum\limits_{i}\exp\left[ -\frac{1}{2}\left(\frac{x_i^2}{\sigma_r(n)}+\frac{y_i^2}{\sigma_g(n)}\right) \right] \right\}$$

Now, I'm either missing something really obvious here or that last equation is wrong and should be:

$$\ln L = -\sum\limits_{n=1}^{M} \ln\left\{\frac{N2\pi\sigma_r(n)\sigma_g(n)}{\sum\limits_{i}\exp\left[ -\frac{1}{2}\left(\frac{x_i^2}{\sigma_r(n)}+\frac{y_i^2}{\sigma_g(n)}\right) \right]} \right\}$$

or equivalently:

$$\ln L = -\sum\limits_{n=1}^{M} \left\{\ln(N2\pi\sigma_r(n)\sigma_g(n))\,-\,\ln\left(\sum\limits_{i}\exp\left[ -\frac{1}{2}\left(\frac{x_i^2}{\sigma_r(n)}+\frac{y_i^2}{\sigma_g(n)}\right) \right] \right) \right\}$$

Is equation (13) in that paper wrong or is my algebra terrible?