fixed problem with log densities not being properly initialized