fixed error in kernel densities