fix bufferData copying