minor fixes in likelihood funct