minor changes in log-det