Pass the expected total length to concat() here: buffers[buffers.length-1].length + data.length