fix a bug for log model