Fix LogDet