fix buffer size