Bug fix with log.