Additional fix in buffer to avoid buffer overflow on last byte.