fix the log bug