Fixed log bug