fixed log_det