fixed logdet underflow issue