fixed a log bug