Derive the Fokker-Planck equation by requiring conservation of probability: $$\int_{\partial V}\mathbf{J}\cdot\mathbf{dS}=-\frac{d}{dt}\int_{V}p(\mathbf{r},t)dV$$ The flux can be written as a sum of convective and diffusive terms $$\mathbf{J}=p(\mathbf{r},t)\mathbf{v}(\mathbf{r},t)-D(\mathbf{r},t)\mathbf{∇}p(\mathbf{r},t)$$ and substitution of this with use of the divergence theorem yields $$\partial_{t}p(x,t)=-\partial_{x}[p(x,t)v(x,t)]+\partial_{x}[D(x,t)\partial_{x }p(x,t)]$$ where I have moved to one dimension for simplicity.
However the form found here is given as $$\partial_{t}p(x,t)=-\partial_{x}[p(x,t)v(x,t)]+\partial_{x}^2[D(x,t)p(x,t)]$$ which differs slightly in the second term.
Essentially the issue is that Fick's law, $$\mathbf{J}_{\textrm{diffusive}}=-D(\mathbf{r},t)\nabla p(\mathbf{r},t)$$ disagrees with the derivation of the Fokker-Planck equation used on wikipedia (which starts from the Langevin equation).
Does anyone see why this is happening?