@Hmm logprob fix

Fixed logprob for more numerical stability and slight speedup