Fix buffer unit tests.