fixed another bug in likelihood calculation