Fix Buffer data race