fixed likelihood calculation bug