BUG: Bug fixes in the kl divergence kernel code.