fixing log buffer.