small bug in log det C