Fixing log bug