fixed log-probability bug