fixed log bug