fixed an invalid memory access when dumping logs