Increase buffer size and fix compile error on linux.