fixed log bug.