Use getMinBufferSize instead of hardcoding a buffer size.