fixed a bug in the likelihood computation