Fix write buffer size