Fix buffer overflow for console log.